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

コンストラクター

コンストラクター

new DirectMessagesClient(client): DirectMessagesClient 新しい direct messages クライアントインスタンスを作成します

パラメーター

戻り値

DirectMessagesClient

定義場所

direct_messages/client.ts:340

メソッド

createByConversationId

createByConversationId(dmConversationId, options): Promise<Response> Create DM message by conversation ID Sends a new direct message to a specific conversation by its ID.

パラメーター

戻り値

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

定義場所

direct_messages/client.ts:385 createByConversationId(dmConversationId, options?): Promise<CreateDmEventResponse>

パラメーター

戻り値

Promise<CreateDmEventResponse>

定義場所

direct_messages/client.ts:398

getEventsByConversationId

getEventsByConversationId(id, options): Promise<Response> Get DM events for a DM conversation Retrieves direct message events for a specific conversation.

パラメーター

戻り値

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

定義場所

direct_messages/client.ts:506 getEventsByConversationId(id, options?): Promise<Get2DmConversationsIdDmEventsResponse>

パラメーター

戻り値

Promise<Get2DmConversationsIdDmEventsResponse>

定義場所

direct_messages/client.ts:519

createConversation

createConversation(options): Promise<Response> Create DM conversation Initiates a new direct message conversation with specified participants.

パラメーター

戻り値

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

定義場所

direct_messages/client.ts:784 createConversation(options?): Promise<CreateDmEventResponse>

パラメーター

戻り値

Promise<CreateDmEventResponse>

定義場所

direct_messages/client.ts:793

getEventsByParticipantId

getEventsByParticipantId(participantId, options): Promise<Response> Get DM events for a DM conversation Retrieves direct message events for a specific conversation.

パラメーター

戻り値

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

定義場所

direct_messages/client.ts:889 getEventsByParticipantId(participantId, options?): Promise<Get2DmConversationsWithParticipantIdDmEventsResponse>

パラメーター

戻り値

Promise<Get2DmConversationsWithParticipantIdDmEventsResponse>

定義場所

direct_messages/client.ts:902

getEvents

getEvents(options): Promise<Response> Get DM events 次の一覧を取得します: recent direct message events across all conversations.

パラメーター

戻り値

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

定義場所

direct_messages/client.ts:1167 getEvents(options?): Promise<Get2DmEventsResponse>

パラメーター

戻り値

Promise<Get2DmEventsResponse>

定義場所

direct_messages/client.ts:1176

getEventsById

getEventsById(eventId, options): Promise<Response> Get DM event by ID Retrieves details of a specific direct message event by its ID.

パラメーター

戻り値

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

定義場所

direct_messages/client.ts:1433 getEventsById(eventId, options?): Promise<Get2DmEventsEventIdResponse>

パラメーター

戻り値

Promise<Get2DmEventsEventIdResponse>

定義場所

direct_messages/client.ts:1446

deleteEvents

deleteEvents(eventId, options): Promise<Response> Delete DM event Deletes a specific direct message event by its ID, if owned by the authenticated user.

パラメーター

戻り値

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

定義場所

direct_messages/client.ts:1656 deleteEvents(eventId): Promise<DeleteDmResponse>

パラメーター

戻り値

Promise<DeleteDmResponse>

定義場所

direct_messages/client.ts:1669

createByParticipantId

createByParticipantId(participantId, options): Promise<Response> Create DM message by participant ID Sends a new direct message to a specific participant by their ID.

パラメーター

戻り値

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

定義場所

direct_messages/client.ts:1760 createByParticipantId(participantId, options?): Promise<CreateDmEventResponse>

パラメーター

戻り値

Promise<CreateDmEventResponse>

定義場所

direct_messages/client.ts:1773