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
새 다이렉트 메시지 Client 인스턴스를 생성합니다
매개변수
| Name | Type | Description |
|---|
client | Client | 주요 X API Client 인스턴스 |
반환값
DirectMessagesClient
정의 위치
direct_messages/client.ts:340
▸ createByConversationId(dmConversationId, options): Promise<Response>
대화 ID로 다이렉트 메시지 생성
지정된 대화의 식별자(ID)를 사용해 새 다이렉트 메시지를 전송합니다.
매개변수
| 이름 | Type | 설명 |
|---|
dmConversationId | string | DM 대화의 id입니다. |
options | CreateByConversationIdOptions & { requestOptions: { raw: true } } | - |
반환값
Promise<Response>
API 응답으로 resolve되는 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 이벤트를 가져오기
특정 DM 대화에 대한 다이렉트 메시지 이벤트를 조회합니다.
파라미터
| Name | Type | Description |
|---|
id | string | DM 대화 ID입니다. |
options | GetEventsByConversationIdOptions & { requestOptions: { raw: true } } | - |
반환값
Promise<Response>
API 응답으로 resolve되는 Promise이며, requestOptions.raw가 true인 경우 원시 Response를 그대로 반환합니다
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 대화 생성
지정된 참여자들과 새로운 직접 메시지(DM) 대화를 시작합니다.
매개변수
| 이름 | type |
|---|
options | CreateConversationOptions & { requestOptions: { raw: true } } |
반환값
Promise<Response>
API 응답을 resolve하는 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 대화에 대한 DM 이벤트를 조회합니다.
| Name | Type | Description |
|---|
participantId | string | 1:1 DM 대화의 참여 사용자 ID입니다. |
options | GetEventsByParticipantIdOptions & { requestOptions: { raw: true } } | - |
반환값
Promise<Response>
API 응답으로 resolve되는 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>
DM 이벤트 가져오기
모든 대화에 걸쳐 최근 다이렉트 메시지 이벤트 목록을 가져옵니다.
매개변수
| 이름 | 타입 |
|---|
options | GetEventsOptions & { requestOptions: { raw: true } } |
반환값
Promise<Response>
API 응답으로 resolve되는 Promise 또는 requestOptions.raw가 true인 경우 원시 Response
direct_messages/client.ts:1167
▸ getEvents(options?): Promise<Get2DmEventsResponse>
매개변수
| 이름 | 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 응답으로 resolve되는 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 응답으로 resolve되는 Promise입니다. requestOptions.raw가 true인 경우에는 원시 Response를 반환합니다
direct_messages/client.ts:1656
▸ deleteEvents(eventId): Promise<DeleteDmResponse>
매개변수
Promise<DeleteDmResponse>
정의 위치
direct_messages/client.ts:1669
▸ createByParticipantId(participantId, options): Promise<Response>
참가자 ID로 DM 메시지 생성
지정된 참가자의 ID를 사용해 새로운 DM 메시지를 전송합니다.
| Name | Type | Description |
|---|
participantId | string | DM을 수신할 사용자 ID입니다. |
options | CreateByParticipantIdOptions & { requestOptions: { raw: true } } | - |
Promise<Response>
API 응답으로 resolve되는 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