> ## 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 के समाचार endpoints के साथ इंटरैक्ट करने के लिए मेथड प्रदान करता है।
यह सभी समाचार-संबंधित ऑपरेशनों के लिए authentication, request formatting और रिस्पॉन्स
parsing को संभालता है।

<div id="constructors">
  ## कंस्ट्रक्टर
</div>

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

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

एक नया समाचार Client instance बनाता है

#### पैरामीटर

| नाम      | type                                                     | विवरण                        |
| :------- | :------------------------------------------------------- | :--------------------------- |
| `client` | [`Client`](/hi/xdks/typescript/reference/classes/Client) | मुख्य X API क्लाइंट इंस्टेंस |

<div id="returns">
  #### वापसी मान
</div>

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

#### में परिभाषित

[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 के आधार पर समाचार आलेख प्राप्त करता है।

#### पैरामीटर

| नाम       | प्रकार                                                     | विवरण             |
| :-------- | :--------------------------------------------------------- | :---------------- |
| `id`      | `string`                                                   | समाचार लेख की ID। |
| `options` | `GetOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                 |

<div id="returns">
  #### वापसी मान
</div>

`Promise`\<`Response`>

API रिस्पॉन्स पर resolve होने वाला `Promise`, या यदि `requestOptions.raw` true है, तो raw `Response`

<div id="defined-in">
  #### यहां परिभाषित है
</div>

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

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

#### पैरामीटर

| नाम        | प्रकार       |
| :--------- | :----------- |
| `id`       | `string`     |
| `options?` | `GetOptions` |

<div id="returns">
  #### वापसी मान
</div>

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

#### यहाँ परिभाषित है

[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`>

समाचार खोजें
निर्दिष्ट खोज क्वेरी से मेल खाने वाले समाचार आइटम की सूची प्राप्त करता है।

#### पैरामीटर

| नाम       | type                                                          | विवरण      |
| :-------- | :------------------------------------------------------------ | :--------- |
| `query`   | `string`                                                      | खोज क्वेरी |
| `options` | `SearchOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -          |

<div id="returns">
  #### वापसी मान
</div>

`Promise`\<`Response`>

API रिस्पॉन्स में resolve होने वाला Promise, या यदि requestOptions.raw true है, तो raw Response

#### में परिभाषित है

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

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

<div id="parameters">
  #### पैरामीटर्स
</div>

| नाम        | type            |
| :--------- | :-------------- |
| `query`    | `string`        |
| `options?` | `SearchOptions` |

<div id="returns">
  #### वापसी मान
</div>

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

#### यहाँ परिभाषित

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