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

# AccountActivityClient

アカウントアクティビティ関連の操作向け Client

この Client は、X API のアカウントアクティビティ用エンドポイントを操作するためのメソッドを提供します。認証、リクエストのフォーマット、レスポンスの解析など、アカウントアクティビティに関連するすべての操作を処理します。

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

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

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

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

#### パラメーター

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

#### 戻り値

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

#### 定義元

[account\_activity/client.ts:70](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L70)

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

<div id="getsubscriptions">
  ### getSubscriptions
</div>

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

サブスクリプションを取得します\
指定した webhook に対するすべての有効なサブスクリプションのリストを取得します。

#### パラメータ

| Name                         | Type     | Description                     |
| :--------------------------- | :------- | :------------------------------ |
| `webhookId`                  | `string` | サブスクリプションを取得する対象の webhook の ID。 |
| `options`                    | `Object` | -                               |
| `options.requestOptions`     | `Object` | -                               |
| `options.requestOptions.raw` | `true`   | -                               |

#### 戻り値

`Promise`\<`Response`>

API レスポンス、または `requestOptions.raw` が true の場合は生の `Response` に解決される Promise

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

[account\_activity/client.ts:115](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L115)

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

#### パラメータ

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

#### 戻り値

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

#### 定義元

[account\_activity/client.ts:128](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L128)

***

<div id="deletesubscription">
  ### deleteSubscription
</div>

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

サブスクリプションを削除します\
指定された webhook とユーザーIDに対する Account Activity サブスクリプションを削除します。

#### パラメーター

| Name                         | Type     | Description                       |
| :--------------------------- | :------- | :-------------------------------- |
| `webhookId`                  | `string` | サブスクリプション対象を確認するための webhook の ID。 |
| `userId`                     | `string` | サブスクリプションを解除するユーザーの ID。           |
| `options`                    | `Object` | -                                 |
| `options.requestOptions`     | `Object` | -                                 |
| `options.requestOptions.raw` | `true`   | -                                 |

#### 戻り値

`Promise`\<`Response`>

API レスポンス、または requestOptions.raw が true の場合は生の Response を返す Promise

#### 定義元

[account\_activity/client.ts:217](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L217)

▸ **deleteSubscription**(`webhookId`, `userId`): `Promise`\<[`SubscriptionsDeleteResponse`](/ja/xdks/typescript/reference/interfaces/Schemas.SubscriptionsDeleteResponse)>

#### パラメーター

| 名前          | 型        |
| :---------- | :------- |
| `webhookId` | `string` |
| `userId`    | `string` |

#### 戻り値

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

#### 定義元

[account\_activity/client.ts:234](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L234)

***

<div id="validatesubscription">
  ### validateSubscription
</div>

▸ **validateSubscription**(`webhookId`, `options`): `Promise`\<`Response`>

サブスクリプションを検証します\
指定された webhook に対するユーザーの Account Activity サブスクリプションが有効かどうかを確認します。

#### パラメーター

| Name                         | Type     | Description                     |
| :--------------------------- | :------- | :------------------------------ |
| `webhookId`                  | `string` | サブスクリプションを検証する対象の webhook の id。 |
| `options`                    | `Object` | -                               |
| `options.requestOptions`     | `Object` | -                               |
| `options.requestOptions.raw` | `true`   | -                               |

#### 戻り値

`Promise`\<`Response`>

API レスポンス (requestOptions.raw が true の場合は生の Response) に解決される Promise

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

[account\_activity/client.ts:331](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L331)

▸ **validateSubscription**(`webhookId`): `Promise`\<[`SubscriptionsGetResponse`](/ja/xdks/typescript/reference/interfaces/Schemas.SubscriptionsGetResponse)>

#### パラメータ

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

#### 戻り値

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

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

[account\_activity/client.ts:344](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L344)

***

<div id="createsubscription">
  ### createSubscription
</div>

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

サブスクリプションを作成します\
ユーザーと指定された webhook 向けの Account Activity サブスクリプションを作成します。

<div id="parameters">
  #### Parameters
</div>

| Name        | Type                                                                      | Description                     |
| :---------- | :------------------------------------------------------------------------ | :------------------------------ |
| `webhookId` | `string`                                                                  | サブスクリプションを確認する対象となる webhook ID。 |
| `options`   | `CreateSubscriptionOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                               |

#### 戻り値

`Promise`\<`Response`>

API レスポンス、または requestOptions.raw が true の場合は生の Response へと resolve される Promise

#### 定義元

[account\_activity/client.ts:435](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L435)

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

#### パラメーター

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

#### 戻り値

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

#### 定義元

[account\_activity/client.ts:448](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L448)

***

<div id="createreplayjob">
  ### createReplayJob
</div>

▸ **createReplayJob**(`webhookId`, `fromDate`, `toDate`, `options`): `Promise`\<`Response`>

リプレイジョブを作成します
指定された webhook に関連付けられているすべてのサブスクリプションに対して、最大過去 5 日間のアクティビティを取得するリプレイジョブを作成します。

#### パラメーター

| Name                         | Type     | Description                                                 |
| :--------------------------- | :------- | :---------------------------------------------------------- |
| `webhookId`                  | `string` | webhook 設定の一意の識別子。                                          |
| `fromDate`                   | `string` | イベントが提供される開始時点を表す最も古い UTC タイムスタンプ (含む) 。`yyyymmddhhmm` 形式。  |
| `toDate`                     | `string` | イベントが提供される終了時点を表す最新の UTC タイムスタンプ (含まない) 。`yyyymmddhhmm` 形式。 |
| `options`                    | `Object` | -                                                           |
| `options.requestOptions`     | `Object` | -                                                           |
| `options.requestOptions.raw` | `true`   | -                                                           |

#### 戻り値

`Promise`\<`Response`>

API レスポンスを返す Promise。requestOptions.raw が true の場合は、生の Response。

#### 定義元

[account\_activity/client.ts:564](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L564)

▸ **createReplayJob**(`webhookId`, `fromDate`, `toDate`): `Promise`\<[`ReplayJobCreateResponse`](/ja/xdks/typescript/reference/interfaces/Schemas.ReplayJobCreateResponse)>

#### パラメーター

| 名前          | 型        |
| :---------- | :------- |
| `webhookId` | `string` |
| `fromDate`  | `string` |
| `toDate`    | `string` |

#### 戻り値

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

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

[account\_activity/client.ts:585](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L585)

***

<div id="getsubscriptioncount">
  ### getSubscriptionCount
</div>

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

サブスクリプション数の取得
現在アクティブな Account Activity サブスクリプション数を取得します。

#### パラメーター

| Name                         | Type     |
| :--------------------------- | :------- |
| `options`                    | `Object` |
| `options.requestOptions`     | `Object` |
| `options.requestOptions.raw` | `true`   |

<div id="returns">
  #### Returns
</div>

`Promise`\<`Response`>

API レスポンスで解決される Promise。`requestOptions.raw` が `true` の場合は生の `Response`

#### 定義元

[account\_activity/client.ts:704](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L704)

▸ **getSubscriptionCount**(): `Promise`\<[`SubscriptionsCountGetResponse`](/ja/xdks/typescript/reference/interfaces/Schemas.SubscriptionsCountGetResponse)>

#### 戻り値

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

#### 定義元

[account\_activity/client.ts:713](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/account_activity/client.ts#L713)
