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 インスタンスを作成します
パラメーター
| Name | Type | Description |
|---|
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 レスポンス (requestOptions.raw が true の場合は生の Response) で解決される Promise
定義元
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 レスポンスに解決される 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