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 के समाचार endpoints के साथ इंटरैक्ट करने के लिए मेथड प्रदान करता है।
यह सभी समाचार-संबंधित ऑपरेशनों के लिए authentication, request formatting और रिस्पॉन्स
parsing को संभालता है।
• new NewsClient(client): NewsClient
एक नया समाचार Client instance बनाता है
पैरामीटर
| नाम | type | विवरण |
|---|
client | Client | मुख्य X API क्लाइंट इंस्टेंस |
NewsClient
में परिभाषित
news/client.ts:96
▸ get(id, options): Promise<Response>
ID के आधार पर समाचार आलेख प्राप्त करें
इसके ID के आधार पर समाचार आलेख प्राप्त करता है।
पैरामीटर
| नाम | प्रकार | विवरण |
|---|
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>
समाचार खोजें
निर्दिष्ट खोज क्वेरी से मेल खाने वाले समाचार आइटम की सूची प्राप्त करता है।
पैरामीटर
| नाम | type | विवरण |
|---|
query | string | खोज क्वेरी |
options | SearchOptions & { requestOptions: { raw: true } } | - |
Promise<Response>
API रिस्पॉन्स में resolve होने वाला Promise, या यदि requestOptions.raw true है, तो raw Response
में परिभाषित है
news/client.ts:288
▸ search(query, options?): Promise<Get2NewsSearchResponse>
| नाम | type |
|---|
query | string |
options? | SearchOptions |
Promise<Get2NewsSearchResponse>
यहाँ परिभाषित
news/client.ts:301