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

# UsageClient

> X API TypeScript SDK の UsageClient クラスのリファレンス。 X API v2 の usage エンドポイントのメソッド、パラメーター、戻り値の型。

usage 操作向けのクライアント

このクライアントは X API の usage エンドポイントと対話するためのメソッドを提供します。認証、リクエストの整形、usage に関連するすべての操作のレスポンス解析を扱います。

## コンストラクター

### コンストラクター

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

新しい usage クライアントインスタンスを作成します

#### パラメーター

| 名前       | 型                                                     | 説明                      |
| :------- | :---------------------------------------------------- | :---------------------- |
| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | メインの X API クライアントインスタンス |

#### 戻り値

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

#### 定義場所

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

## メソッド

### get

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

Get usage
Retrieves usage statistics for Posts over a specified number of days.

#### パラメーター

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

#### 戻り値

`Promise`\<`Response`>

API レスポンスに解決される Promise。requestOptions.raw が true の場合は生の Response を返します

#### 定義場所

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

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

#### パラメーター

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

#### 戻り値

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

#### 定義場所

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