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 NewsClient(client): NewsClient
새 NewsClient 인스턴스를 생성합니다
| 이름 | 타입 | 설명 |
|---|
client | Client | 주요 X API Client 인스턴스 |
NewsClient
news/client.ts:96
▸ get(id, options): Promise<Response>
ID로 뉴스 스토리를 가져옵니다.
주어진 ID를 사용해 뉴스 스토리를 가져옵니다.
| Name | Type | Description |
|---|
id | string | 뉴스 기사의 식별자(id)입니다. |
options | GetOptions & { requestOptions: { raw: true } } | - |
Promise<Response>
API 응답으로 resolve되는 Promise이며, requestOptions.raw가 true인 경우에는 raw Response를 반환합니다.
정의 위치
news/client.ts:141
▸ get(id, options?): Promise<Get2NewsIdResponse>
| 이름 | 타입 |
|---|
id | string |
options? | GetOptions |
Promise<Get2NewsIdResponse>
news/client.ts:154
▸ search(query, options): Promise<Response>
뉴스 검색
지정된 검색 쿼리에 부합하는 뉴스 스토리 목록을 가져옵니다.
| Name | Type | Description |
|---|
query | string | 검색 쿼리입니다. |
options | SearchOptions & { requestOptions: { raw: true } } | - |
반환값
Promise<Response>
API 응답으로 resolve되는 Promise이며, requestOptions.raw가 true인 경우에는 원시 Response입니다.
정의 위치
news/client.ts:288
▸ search(query, options?): Promise<Get2NewsSearchResponse>
| 이름 | Type |
|---|
query | string |
options? | SearchOptions |
반환값
Promise<Get2NewsSearchResponse>
news/client.ts:301