생성자
constructor
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:398getEventsByConversationId
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를 그대로 반환합니다
정의된 위치
id, options?): Promise<Get2DmConversationsIdDmEventsResponse>
매개변수
| 이름 | 타입 |
|---|---|
id | string |
options? | GetEventsByConversationIdOptions |
반환
Promise<Get2DmConversationsIdDmEventsResponse>
정의된 위치
createConversation
options): Promise<Response>
DM 대화 생성
지정된 참여자들과 새로운 직접 메시지(DM) 대화를 시작합니다.
매개변수
| 이름 | type |
|---|---|
options | CreateConversationOptions & { requestOptions: { raw: true } } |
반환값
Promise<Response>
API 응답을 resolve하는 Promise이거나, requestOptions.raw 가 true 인 경우 원시 Response
정의된 위치
options?): Promise<CreateDmEventResponse>
매개변수
| 이름 | type |
|---|---|
options? | CreateConversationOptions |
반환값
Promise<CreateDmEventResponse>
정의된 위치
getEventsByParticipantId
participantId, options): Promise<Response>
DM 대화의 이벤트를 가져옵니다.
특정 DM 대화에 대한 DM 이벤트를 조회합니다.
Parameters
| 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>
정의된 위치
getEvents
options): Promise<Response>
DM 이벤트 가져오기
모든 대화에 걸쳐 최근 다이렉트 메시지 이벤트 목록을 가져옵니다.
매개변수
| 이름 | 타입 |
|---|---|
options | GetEventsOptions & { requestOptions: { raw: true } } |
반환값
Promise<Response>
API 응답으로 resolve되는 Promise 또는 requestOptions.raw가 true인 경우 원시 Response
정의된 위치
options?): Promise<Get2DmEventsResponse>
매개변수
| 이름 | Type |
|---|---|
options? | GetEventsOptions |
반환
Promise<Get2DmEventsResponse>
정의된 위치
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>
정의된 위치
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를 반환합니다
정의된 위치
eventId): Promise<DeleteDmResponse>
매개변수
| 이름 | Type |
|---|---|
eventId | string |
반환 값
Promise<DeleteDmResponse>
정의 위치
direct_messages/client.ts:1669createByParticipantId
participantId, options): Promise<Response>
참가자 ID로 DM 메시지 생성
지정된 참가자의 ID를 사용해 새로운 DM 메시지를 전송합니다.
Parameters
| Name | Type | Description |
|---|---|---|
participantId | string | DM을 수신할 사용자 ID입니다. |
options | CreateByParticipantIdOptions & { requestOptions: { raw: true } } | - |
반환
Promise<Response>
API 응답으로 resolve되는 Promise이며, requestOptions.raw가 true인 경우 원시 Response
정의된 위치
participantId, options?): Promise<CreateDmEventResponse>
매개변수
| 이름 | 타입 |
|---|---|
participantId | string |
options? | CreateByParticipantIdOptions |
반환
Promise<CreateDmEventResponse>