Documentation Index
Fetch the complete documentation index at: https://generaltranslation.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
ダイレクトメッセージ関連の操作用 Client
この Client は、X API のダイレクトメッセージ用エンドポイントとやり取りするためのメソッドを提供します。認証、リクエストフォーマットの構築、レスポンスの解析など、ダイレクトメッセージに関連するすべての操作を処理します。
• new DirectMessagesClient(client): DirectMessagesClient
新しい DirectMessagesClient インスタンスを作成します
| Name | Type | Description |
|---|
client | Client | X API のメインとなる Client インスタンス |
戻り値
DirectMessagesClient
定義元
direct_messages/client.ts:340
▸ createByConversationId(dmConversationId, options): Promise<Response>
会話 ID を指定して DM メッセージを作成します
指定した会話 ID に新しいダイレクトメッセージを送信します。
| Name | Type | Description |
|---|
dmConversationId | string | DM会話のID。 |
options | CreateByConversationIdOptions & { requestOptions: { raw: true } } | - |
戻り値
Promise<Response>
API レスポンスを返す Promise。requestOptions.raw が true の場合は未加工の Response
direct_messages/client.ts:385
▸ createByConversationId(dmConversationId, options?): Promise<CreateDmEventResponse>
パラメータ
| 名前 | 型 |
|---|
dmConversationId | string |
options? | CreateByConversationIdOptions |
戻り値
Promise<CreateDmEventResponse>
direct_messages/client.ts:398
getEventsByConversationId
▸ getEventsByConversationId(id, options): Promise<Response>
DM 会話に紐づく DM イベントを取得します
特定の会話に含まれるダイレクトメッセージイベントを取得します。
| Name | Type | Description |
|---|
id | string | DM会話のID。 |
options | GetEventsByConversationIdOptions & { requestOptions: { raw: true } } | - |
Promise<Response>
API レスポンス (または requestOptions.raw が true の場合は生の Response) で解決される Promise
direct_messages/client.ts:506
▸ getEventsByConversationId(id, options?): Promise<Get2DmConversationsIdDmEventsResponse>
| 名前 | 型 |
|---|
id | string |
options? | GetEventsByConversationIdOptions |
戻り値
Promise<Get2DmConversationsIdDmEventsResponse>
定義元
direct_messages/client.ts:519
▸ createConversation(options): Promise<Response>
ダイレクトメッセージ (DM) の会話を作成します
指定した参加者との新しいダイレクトメッセージ会話を開始します。
| 名前 | type |
|---|
options | CreateConversationOptions & { requestOptions: { raw: true } } |
Promise<Response>
API レスポンスを返す Promise。requestOptions.raw が true の場合は生の Response
direct_messages/client.ts:784
▸ createConversation(options?): Promise<CreateDmEventResponse>
パラメータ
| 名前 | type |
|---|
options? | CreateConversationOptions |
戻り値
Promise<CreateDmEventResponse>
direct_messages/client.ts:793
▸ getEventsByParticipantId(participantId, options): Promise<Response>
DM会話のイベントを取得します
特定のDM会話におけるダイレクトメッセージイベントを取得します。
| Name | Type | Description |
|---|
participantId | string | 1対1の DM 会話に参加しているユーザーの ID。 |
options | GetEventsByParticipantIdOptions & { requestOptions: { raw: true } } | - |
戻り値
Promise<Response>
API レスポンスで解決される Promise。requestOptions.raw が true の場合は生の Response オブジェクト
direct_messages/client.ts:889
▸ getEventsByParticipantId(participantId, options?): Promise<Get2DmConversationsWithParticipantIdDmEventsResponse>
パラメータ
| 名前 | 型 |
|---|
participantId | string |
options? | GetEventsByParticipantIdOptions |
戻り値
Promise<Get2DmConversationsWithParticipantIdDmEventsResponse>
direct_messages/client.ts:902
▸ getEvents(options): Promise<Response>
ダイレクトメッセージイベントを取得します
すべての会話にわたる直近のダイレクトメッセージイベントのリストを取得します。
パラメータ
| 名前 | 型 |
|---|
options | GetEventsOptions & { requestOptions: { raw: true } } |
戻り値
Promise<Response>
API レスポンスを返す Promise。requestOptions.raw が true の場合は生の Response。
direct_messages/client.ts:1167
▸ getEvents(options?): Promise<Get2DmEventsResponse>
パラメータ
| Name | Type |
|---|
options? | GetEventsOptions |
戻り値
Promise<Get2DmEventsResponse>
direct_messages/client.ts:1176
▸ getEventsById(eventId, options): Promise<Response>
ID で DM イベントを取得します
指定した ID を持つダイレクトメッセージイベントの詳細を取得します。
パラメータ
| Name | Type | Description |
|---|
eventId | string | DM イベントの id。 |
options | GetEventsByIdOptions & { requestOptions: { raw: true } } | - |
戻り値
Promise<Response>
API レスポンスで解決される Promise。requestOptions.raw が true の場合は生の Response となります
direct_messages/client.ts:1433
▸ getEventsById(eventId, options?): Promise<Get2DmEventsEventIdResponse>
パラメータ
| パラメータ名 | 型 |
|---|
eventId | string |
options? | GetEventsByIdOptions |
戻り値
Promise<Get2DmEventsEventIdResponse>
定義元
direct_messages/client.ts:1446
▸ deleteEvents(eventId, options): Promise<Response>
DM イベントを削除します
認証済みユーザーが所有している場合は、指定した id のダイレクトメッセージイベントを削除します。
パラメータ
| Name | Type | Description |
|---|
eventId | string | 削除するダイレクトメッセージイベントのID。 |
options | Object | - |
options.requestOptions | Object | - |
options.requestOptions.raw | true | - |
戻り値
Promise<Response>
API レスポンス、または requestOptions.raw が true の場合は生の Response オブジェクトを返す Promise
定義元
direct_messages/client.ts:1656
▸ deleteEvents(eventId): Promise<DeleteDmResponse>
パラメータ
戻り値
Promise<DeleteDmResponse>
direct_messages/client.ts:1669
▸ createByParticipantId(participantId, options): Promise<Response>
参加者IDでDMメッセージを作成します
特定の参加者のIDを指定して、新しいダイレクトメッセージを送信します。
| Name | Type | Description |
|---|
participantId | string | DM を受信するユーザーの ID。 |
options | CreateByParticipantIdOptions & { requestOptions: { raw: true } } | - |
戻り値
Promise<Response>
API レスポンスを返す Promise。requestOptions.raw が true の場合は Response オブジェクトそのもの。
定義元
direct_messages/client.ts:1760
▸ createByParticipantId(participantId, options?): Promise<CreateDmEventResponse>
| 名前 | 型 |
|---|
participantId | string |
options? | CreateByParticipantIdOptions |
戻り値
Promise<CreateDmEventResponse>
direct_messages/client.ts:1773