메인 콘텐츠로 건너뛰기
커뮤니티 작업용 클라이언트 이 클라이언트는 X API의 커뮤니티 엔드포인트와 상호작용하기 위한 메서드를 제공합니다. 커뮤니티 관련 모든 작업에 대해 인증, 요청 서식화, 응답 파싱을 처리합니다.

생성자

constructor

new CommunitiesClient(client): CommunitiesClient 새 커뮤니티 클라이언트 인스턴스를 생성합니다

매개변수

이름유형설명
clientClient주요 X API 클라이언트 인스턴스

반환

CommunitiesClient

정의 위치

communities/client.ts:68

메서드

getById

getById(id, options?): Promise<Get2CommunitiesIdResponse> ID로 커뮤니티 가져오기 ID로 특정 커뮤니티의 세부 정보를 조회합니다.

매개변수

이름유형설명
idstring커뮤니티의 id입니다.
optionsGetByIdOptions-

반환

Promise<Get2CommunitiesIdResponse> API 응답으로 해석되는 Promise

정의됨

communities/client.ts:85
search(query, options?): Promise<Get2CommunitiesSearchResponse> 커뮤니티 검색 지정한 검색어와 일치하는 커뮤니티 목록을 가져옵니다.

매개변수

이름유형설명
querystring커뮤니티를 검색할 때 사용하는 쿼리입니다.
optionsSearchOptions-

반환

Promise<Get2CommunitiesSearchResponse> API 응답으로 resolve되는 Promise

정의됨

communities/client.ts:135