생성자
constructor
client): DirectMessagesClient
새 다이렉트 메시지 클라이언트 인스턴스를 생성합니다
매개변수
| 이름 | 타입 | 설명 |
|---|---|---|
client | Client | 주요 X API 클라이언트 인스턴스 |
반환값
DirectMessagesClient
정의됨
direct_messages/client.ts:211메서드
getEvents
options?): Promise<Get2DmEventsResponse>
DM 이벤트 가져오기
모든 대화에서 최근 다이렉트 메시지 이벤트의 목록을 조회합니다.
매개변수
| 이름 | 타입 |
|---|---|
options | GetEventsOptions |
반환
Promise<Get2DmEventsResponse>
API 응답으로 이행되는 Promise
정의됨
direct_messages/client.ts:224getEventsByParticipantId
participantId, options?): Promise<Get2DmConversationsWithParticipantIdDmEventsResponse>
DM 대화의 DM 이벤트 가져오기
특정 대화의 다이렉트 메시지 이벤트를 가져옵니다.
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
participantId | string | 일대일 DM 대화의 참여자 사용자 id입니다. |
options | GetEventsByParticipantIdOptions | - |
반환
Promise<Get2DmConversationsWithParticipantIdDmEventsResponse>
API 응답으로 이행되는 Promise
정의됨
direct_messages/client.ts:311createByConversationId
dmConversationId, options?): Promise<CreateDmEventResponse>
대화 ID로 DM 메시지 생성
지정한 ID의 특정 대화에 새 다이렉트 메시지를 보냅니다.
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
dmConversationId | string | DM 대화 id. |
options | CreateByConversationIdOptions | - |
반환
Promise<CreateDmEventResponse>
API 응답으로 이행되는 Promise
정의 위치
createByParticipantId
participantId, options?): Promise<CreateDmEventResponse>
참가자 ID로 DM 메시지 생성
지정한 참가자의 ID로 새 다이렉트 메시지를 보냅니다.
매개변수
| 이름 | 타입 | 설명 |
|---|---|---|
participantId | string | DM을 받을 대상 사용자의 id입니다. |
options | CreateByParticipantIdOptions | - |
반환값
Promise<CreateDmEventResponse>
API 응답으로 이행되는 Promise
정의됨
direct_messages/client.ts:457getEventsByConversationId
id, options?): Promise<Get2DmConversationsIdDmEventsResponse>
DM 대화의 DM 이벤트 가져오기
특정 대화의 다이렉트 메시지 이벤트를 조회합니다.
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
id | string | DM 대화 id입니다. |
options | GetEventsByConversationIdOptions | - |
반환
Promise<Get2DmConversationsIdDmEventsResponse>
API 응답으로 이행되는 Promise
정의 위치
getEventsById
eventId, options?): Promise<Get2DmEventsEventIdResponse>
ID로 DM 이벤트 가져오기
지정된 ID의 특정 다이렉트 메시지 이벤트 세부 정보를 조회합니다.
매개변수
| 이름 | 타입 | 설명 |
|---|---|---|
eventId | string | DM 이벤트 id. |
options | GetEventsByIdOptions | - |
반환
Promise<Get2DmEventsEventIdResponse>
API 응답으로 해결되는 Promise
정의 위치
deleteEvents
eventId): Promise<DeleteDmResponse>
DM 이벤트 삭제
인증된 사용자가 소유한 경우, 지정한 ID의 다이렉트 메시지 이벤트를 삭제합니다.
매개변수
| 이름 | 유형 | 설명 |
|---|---|---|
eventId | string | 삭제할 다이렉트 메시지 이벤트의 id입니다. |
반환
Promise<DeleteDmResponse>
API 응답으로 해소되는 Promise
정의됨
direct_messages/client.ts:674createConversation
options?): Promise<CreateDmEventResponse>
DM 대화 생성
지정된 참여자와 새 다이렉트 메시지 대화를 시작합니다.
매개변수
| 이름 | 유형 |
|---|---|
options | CreateConversationOptions |
반환
Promise<CreateDmEventResponse>
API 응답으로 해결되는 Promise