> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TypeScript XDK

> 스마트 페이지네이션, OAuth 1.0a, OAuth 2.0, Bearer Token 인증, 실시간 스트리밍 및 전체 타입 안전성을 갖춘 X API v2용 TypeScript XDK 개요.

X API(이전 Twitter API)를 위한 종합적인 TypeScript SDK로, 스마트 페이지네이션, 다양한 인증 방식, 실시간 스트리밍, 완전한 타입 안전성 등의 고급 기능을 포함합니다.

## 주요 기능

* **🔐 인증**: 사용자 컨텍스트(OAuth 1.0a, OAuth 2.0) 및 앱 전용(Bearer Token) 인증
* **🔄 페이지네이션**: 비동기 반복 지원을 통한 자동 페이지네이션
* **📡 스트리밍**: 자동 재연결이 포함된 이벤트 기반 스트리밍
* **📚 타입 안전성**: 모든 엔드포인트와 매개변수에 대한 완전한 TypeScript 정의
* **🎯 완전한 X API 지원**: Users, Posts, Lists, Bookmarks, Communities 등

## 빠른 시작

<CodeGroup dropdown>
  ```typescript title="quickstart.ts" lines wrap icon="square-js" theme={null} theme={null}
  import { 
      Client, 
      type ClientConfig,
      type Users
  } from '@xdevplatform/xdk';

  const config: ClientConfig = { bearerToken: 'your-bearer-token' };

  const client: Client = new Client(config);

  async function main(): Promise<void> {
    const userResponse: Users.GetByUsernameResponse = await client.users.getByUsername('XDevelopers');
    const username: string = userResponse.data?.username!;
    console.log(username);
  }

  main();
  ```

  ```javascript quickstart.js theme={null} theme={null}
  import { Client } from '@xdevplatform/xdk';

  const client = new Client({ bearerToken: 'your-bearer-token' });

  const userResponse = await client.users.getByUsername('XDevelopers');
  const username = userResponse.data.username;
  console.log(username);
  ```
</CodeGroup>

<Info>
  Javascript/TypeScript XDK를 사용하는 자세한 코드 예제는 [코드 샘플 GitHub 저장소](https://github.com/xdevplatform/samples/tree/main/javascript)를 확인하세요.
</Info>

## 다음은 무엇인가요?

* [설치 가이드](/xdks/typescript/install) - 프로젝트에서 SDK 설정
* [인증](/xdks/typescript/authentication) - 다양한 인증 방식에 대해 알아보기
* [페이지네이션](/xdks/typescript/pagination) - 데이터 페이지네이션에 대해 알아보기
* [스트리밍](/xdks/typescript/streaming) - 실시간 데이터 스트리밍에 대해 알아보기
* [API 레퍼런스](/xdks/typescript/reference/classes/Client) - 전체 API 문서 읽기
