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

# ActivityClient

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

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

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

## コンストラクター

### コンストラクター

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

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

#### パラメーター

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

#### 戻り値

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

#### 定義場所

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

## メソッド

### getSubscriptions

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

Get X activity subscriptions
Get a list of active subscriptions for XAA

#### パラメーター

| 名前                           | 型        |
| :--------------------------- | :------- |
| `options`                    | `Object` |
| `options.requestOptions`     | `Object` |
| `options.requestOptions.raw` | `true`   |

#### 戻り値

`Promise`\<`Response`>

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

#### 定義場所

[activity/client.ts:159](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L159)

▸ **getSubscriptions**(): `Promise`\<[`ActivitySubscriptionGetResponse`](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionGetResponse)>

#### 戻り値

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

#### 定義場所

[activity/client.ts:168](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L168)

***

### createSubscription

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

Create X activity subscription
Creates a subscription for an X activity event

#### パラメーター

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

#### 戻り値

`Promise`\<`Response`>

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

#### 定義場所

[activity/client.ts:237](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L237)

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

#### パラメーター

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

#### 戻り値

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

#### 定義場所

[activity/client.ts:246](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L246)

***

### stream

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

Activity Stream
Stream of X Activities

#### パラメーター

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

#### 戻り値

`Promise`\<`Response`>

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

#### 定義場所

[activity/client.ts:332](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L332)

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

#### パラメーター

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

#### 戻り値

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

#### 定義場所

[activity/client.ts:341](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L341)

***

### updateSubscription

▸ **updateSubscription**(`subscriptionId`, `options`): `Promise`\<`Response`>

Update X activity subscription
Updates a subscription for an X activity event

#### パラメーター

| 名前               | 型                                                                         | 説明                                    |
| :--------------- | :------------------------------------------------------------------------ | :------------------------------------ |
| `subscriptionId` | `string`                                                                  | The ID of the subscription to update. |
| `options`        | `UpdateSubscriptionOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                                     |

#### 戻り値

`Promise`\<`Response`>

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

#### 定義場所

[activity/client.ts:487](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L487)

▸ **updateSubscription**(`subscriptionId`, `options?`): `Promise`\<[`ActivitySubscriptionUpdateResponse`](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionUpdateResponse)>

#### パラメーター

| 名前               | 型                           |
| :--------------- | :-------------------------- |
| `subscriptionId` | `string`                    |
| `options?`       | `UpdateSubscriptionOptions` |

#### 戻り値

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

#### 定義場所

[activity/client.ts:500](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L500)

***

### deleteSubscription

▸ **deleteSubscription**(`subscriptionId`, `options`): `Promise`\<`Response`>

Deletes X activity subscription
Deletes a subscription for an X activity event

#### パラメーター

| 名前                           | 型        | 説明                                    |
| :--------------------------- | :------- | :------------------------------------ |
| `subscriptionId`             | `string` | The ID of the subscription to delete. |
| `options`                    | `Object` | -                                     |
| `options.requestOptions`     | `Object` | -                                     |
| `options.requestOptions.raw` | `true`   | -                                     |

#### 戻り値

`Promise`\<`Response`>

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

#### 定義場所

[activity/client.ts:602](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L602)

▸ **deleteSubscription**(`subscriptionId`): `Promise`\<[`ActivitySubscriptionDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.ActivitySubscriptionDeleteResponse)>

#### パラメーター

| 名前               | 型        |
| :--------------- | :------- |
| `subscriptionId` | `string` |

#### 戻り値

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

#### 定義場所

[activity/client.ts:615](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/activity/client.ts#L615)
