> ## 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.

# UsageClient

使用状況操作用の Client

この Client は、X API の使用状況エンドポイントとやり取りするためのメソッドを提供します。認証、リクエストの整形、および使用状況に関連するすべての操作に対するレスポンスのパースを処理します。

<div id="constructors">
  ## コンストラクタ
</div>

<div id="constructor">
  ### constructor
</div>

• **new UsageClient**(`client`): [`UsageClient`](/ja/xdks/typescript/reference/classes/UsageClient)

新しい UsageClient インスタンスを作成します

<div id="parameters">
  #### パラメーター
</div>

| Name     | Type                                                     | Description              |
| :------- | :------------------------------------------------------- | :----------------------- |
| `client` | [`Client`](/ja/xdks/typescript/reference/classes/Client) | メインの X API Client インスタンス |

<div id="returns">
  #### 戻り値
</div>

[`UsageClient`](/ja/xdks/typescript/reference/classes/UsageClient)

<div id="defined-in">
  #### 定義場所
</div>

[usage/client.ts:68](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/usage/client.ts#L68)

<div id="methods">
  ## メソッド
</div>

<div id="get">
  ### get
</div>

▸ **get**(`options`): `Promise`\<`Response`>

利用状況を取得\
指定した日数にわたる投稿の利用統計を取得します。

#### パラメータ

| 名前        | 型                                                          |
| :-------- | :--------------------------------------------------------- |
| `options` | `GetOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<`Response`>

API レスポンスを解決値とする Promise。`requestOptions.raw` が true の場合は、生の `Response` を解決値とする Promise

<div id="defined-in">
  #### 定義場所
</div>

[usage/client.ts:109](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/usage/client.ts#L109)

▸ **get**(`options?`): `Promise`\<[`Get2UsageTweetsResponse`](/ja/xdks/typescript/reference/interfaces/Schemas.Get2UsageTweetsResponse)>

#### パラメータ

| 名前         | 型            |
| :--------- | :----------- |
| `options?` | `GetOptions` |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`Get2UsageTweetsResponse`](/ja/xdks/typescript/reference/interfaces/Schemas.Get2UsageTweetsResponse)>

<div id="defined-in">
  #### 定義場所
</div>

[usage/client.ts:118](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/usage/client.ts#L118)
