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

# NewsClient

뉴스 관련 작업을 위한 Client

이 Client는 X API의 뉴스 엔드포인트와 상호 작용하기 위한 메서드를 제공합니다.
인증, 요청 서식 지정, 응답 파싱을 처리하여 뉴스와 관련된 모든 작업을 수행합니다.

<div id="constructors">
  ## 생성자
</div>

<div id="constructor">
  ### constructor
</div>

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

새 `NewsClient` 인스턴스를 생성합니다

<div id="parameters">
  #### 매개변수
</div>

| 이름       | 타입                                                       | 설명                   |
| :------- | :------------------------------------------------------- | :------------------- |
| `client` | [`Client`](/ko/xdks/typescript/reference/classes/Client) | 주요 X API Client 인스턴스 |

#### 반환

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

<div id="defined-in">
  #### 정의된 위치
</div>

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

<div id="methods">
  ## 메서드
</div>

<div id="get">
  ### get
</div>

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

ID로 뉴스 스토리를 가져옵니다.
주어진 ID를 사용해 뉴스 스토리를 가져옵니다.

<div id="parameters">
  #### 매개변수
</div>

| 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](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/news/client.ts#L141)

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

<div id="parameters">
  #### 매개변수
</div>

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

<div id="returns">
  #### 반환 값
</div>

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

<div id="defined-in">
  #### 정의된 위치
</div>

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

***

<div id="search">
  ### search
</div>

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

뉴스 검색
지정된 검색 쿼리에 부합하는 뉴스 스토리 목록을 가져옵니다.

<div id="parameters">
  #### 매개변수
</div>

| Name      | Type                                                          | Description |
| :-------- | :------------------------------------------------------------ | :---------- |
| `query`   | `string`                                                      | 검색 쿼리입니다.   |
| `options` | `SearchOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -           |

#### 반환값

`Promise`\<`Response`>

API 응답으로 resolve되는 `Promise`이며, `requestOptions.raw`가 `true`인 경우에는 원시 `Response`입니다.

#### 정의 위치

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

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

<div id="parameters">
  #### 매개변수
</div>

| 이름         | Type            |
| :--------- | :-------------- |
| `query`    | `string`        |
| `options?` | `SearchOptions` |

#### 반환값

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

<div id="defined-in">
  #### 정의된 위치
</div>

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