> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# NewsClient

> X API TypeScript SDK의 NewsClient 클래스에 대한 레퍼런스. X API v2 news 엔드포인트에 대한 메서드, 매개변수 및 반환 타입.

news 작업을 위한 클라이언트

이 클라이언트는 X API의 news 엔드포인트와 상호작용하기 위한 메서드를
제공합니다. 모든 news 관련 작업에 대한 인증, 요청 형식화 및 응답
파싱을 처리합니다.

## 생성자

### constructor

• **new NewsClient**(`client`): [`NewsClient`](/xdks/typescript/reference/classes/NewsClient)

새 news 클라이언트 인스턴스를 생성합니다

#### 매개변수

| 이름       | 타입                                                    | 설명                  |
| :------- | :---------------------------------------------------- | :------------------ |
| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | 메인 X API 클라이언트 인스턴스 |

#### 반환값

[`NewsClient`](/xdks/typescript/reference/classes/NewsClient)

#### 정의 위치

[news/client.ts:96](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/news/client.ts#L96)

## 메서드

### get

▸ **get**(`id`, `options`): `Promise`\<`Response`>

Get news stories by ID
ID로 뉴스 스토리를 검색합니다.

#### 매개변수

| 이름        | 타입                                                         | 설명             |
| :-------- | :--------------------------------------------------------- | :------------- |
| `id`      | `string`                                                   | 뉴스 스토리의 ID입니다. |
| `options` | `GetOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -              |

#### 반환값

`Promise`\<`Response`>

API 응답 또는 requestOptions.raw가 true인 경우 원본 Response로 해결되는 Promise

#### 정의 위치

[news/client.ts:141](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/news/client.ts#L141)

▸ **get**(`id`, `options?`): `Promise`\<[`Get2NewsIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2NewsIdResponse)>

#### 매개변수

| 이름         | 타입           |
| :--------- | :----------- |
| `id`       | `string`     |
| `options?` | `GetOptions` |

#### 반환값

`Promise`\<[`Get2NewsIdResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2NewsIdResponse)>

#### 정의 위치

[news/client.ts:154](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/news/client.ts#L154)

***

### search

▸ **search**(`query`, `options`): `Promise`\<`Response`>

Search News
지정된 검색 쿼리와 일치하는 News 스토리 목록을 검색합니다.

#### 매개변수

| 이름        | 타입                                                            | 설명        |
| :-------- | :------------------------------------------------------------ | :-------- |
| `query`   | `string`                                                      | 검색 쿼리입니다. |
| `options` | `SearchOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -         |

#### 반환값

`Promise`\<`Response`>

API 응답 또는 requestOptions.raw가 true인 경우 원본 Response로 해결되는 Promise

#### 정의 위치

[news/client.ts:288](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/news/client.ts#L288)

▸ **search**(`query`, `options?`): `Promise`\<[`Get2NewsSearchResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2NewsSearchResponse)>

#### 매개변수

| 이름         | 타입              |
| :--------- | :-------------- |
| `query`    | `string`        |
| `options?` | `SearchOptions` |

#### 반환값

`Promise`\<[`Get2NewsSearchResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2NewsSearchResponse)>

#### 정의 위치

[news/client.ts:301](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/news/client.ts#L301)
