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

# TypeScript XDK

X API (旧称 Twitter API) 向けの包括的な TypeScript SDK で、スマートなページネーション、複数の認証方法、リアルタイムストリーミング、完全な型安全などの高度な機能を備えています。

<div id="key-features">
  ## 主な機能
</div>

* **🔐 認証**: ユーザーコンテキスト (OAuth1.0a, OAuth2.0) および App-Only (ベアラートークン) 認証
* **🔄 ページネーション**: 非同期イテレーションに対応した自動ページネーション
* **📡 ストリーミング**: 自動再接続付きのイベント駆動型ストリーミング
* **📚 型安全性**: すべてのエンドポイントとパラメーターに対する完全な TypeScript 定義
* **🎯 X API をフルサポート**: ユーザー、投稿、リスト、ブックマーク、コミュニティ など

<div id="quick-start">
  ## クイックスタート
</div>

<CodeGroup dropdown>
  ```typescript quickstart.ts 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>

<div id="whats-next">
  ## 次にできること
</div>

* [Installation Guide](/ja/xdks/typescript/install) - プロジェクトに SDK を導入する
* [Authentication](/ja/xdks/typescript/authentication) - さまざまな認証方式について学ぶ
* [Pagination](/ja/xdks/typescript/pagination) - データのページネーションについて学ぶ
* [Streaming](/ja/xdks/typescript/streaming) - リアルタイムデータのストリーミングについて学ぶ
* [API Reference](/ja/xdks/typescript/reference/Client) - APIリファレンスの全体を参照する
