उपयोगी टूल
Postman
कोड नमूने
तृतीय-पक्ष लाइब्रेरी
मुख्य अवधारणाएँ
प्रमाणीकरण
डेवलपर कंसोल, प्रोजेक्ट, और डेवलपर ऐप्स
रेट लिमिट्स
कोड उदाहरण
सूची बनाएँ
cURL
एक सूची अपडेट करें
cURL
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
| एंडपॉइंट | HTTP विधि | रेट लिमिट |
| /2/lists | POST | 15 मिनट में 300 अनुरोध |
| /2/lists/:id | DELETE / PUT | 15 मिनट में 300 अनुरोध |
curl -X POST "https://api.x.com/2/lists" \
-H "Authorization: OAuth ..." \
-H "Content-Type: application/json" \
-d '{"name": "My List", "description": "A list of interesting accounts"}'
from xdk import Client
from xdk.oauth1_auth import OAuth1
oauth1 = OAuth1(
api_key="YOUR_API_KEY",
api_secret="YOUR_API_SECRET",
access_token="YOUR_ACCESS_TOKEN",
access_token_secret="YOUR_ACCESS_TOKEN_SECRET"
)
client = Client(auth=oauth1)
# नई सूची बनाएँ
response = client.lists.create(
name="My List",
description="A list of interesting accounts"
)
print(response.data)
import { Client, OAuth1 } from "@xdevplatform/xdk";
const oauth1 = new OAuth1({
apiKey: "YOUR_API_KEY",
apiSecret: "YOUR_API_SECRET",
accessToken: "YOUR_ACCESS_TOKEN",
accessTokenSecret: "YOUR_ACCESS_TOKEN_SECRET",
});
const client = new Client({ oauth1 });
// नई सूची बनाएँ
const response = await client.lists.create({
name: "My List",
description: "A list of interesting accounts",
});
console.log(response.data);
curl -X PUT "https://api.x.com/2/lists/123456789" \
-H "Authorization: OAuth ..." \
-H "Content-Type: application/json" \
-d '{"name": "Updated List Name"}'
from xdk import Client
from xdk.oauth1_auth import OAuth1
oauth1 = OAuth1(
api_key="YOUR_API_KEY",
api_secret="YOUR_API_SECRET",
access_token="YOUR_ACCESS_TOKEN",
access_token_secret="YOUR_ACCESS_TOKEN_SECRET"
)
client = Client(auth=oauth1)
# एक सूची अपडेट करें
response = client.lists.update(
list_id="123456789",
name="Updated List Name"
)
print(response.data)
import { Client, OAuth1 } from "@xdevplatform/xdk";
const oauth1 = new OAuth1({
apiKey: "YOUR_API_KEY",
apiSecret: "YOUR_API_SECRET",
accessToken: "YOUR_ACCESS_TOKEN",
accessTokenSecret: "YOUR_ACCESS_TOKEN_SECRET",
});
const client = new Client({ oauth1 });
// एक सूची अपडेट करें
const response = await client.lists.update("123456789", {
name: "Updated List Name",
});
console.log(response.data);