> ## 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 엔드포인트를 위한 메서드, 매개변수 및 반환 타입입니다.

사용량 작업을 위한 클라이언트

이 클라이언트는 X API의 usage 엔드포인트와 상호작용하기 위한 메서드를 제공합니다.
이 클라이언트는 인증, 요청 형식 지정, 그리고
모든 usage 관련 작업에 대한 응답 파싱을 처리합니다.

## 생성자

### constructor

• **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`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### 정의 위치

[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)
