X API के जवाब छिपाना एंडपॉइंट्स की तुलना
कोड उदाहरण
जवाब छिपाएँ (v2)
cURL
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
| विवरण | Labs v2 | X API v2 |
|---|---|---|
| होस्ट डोमेन | https://api.x.com | https://api.x.com |
| एंडपॉइंट पथ | /labs/2/tweets/:id/hidden | /2/tweets/:id/hidden |
| प्रमाणीकरण | OAuth 1.0a उपयोगकर्ता संदर्भ | OAuth 1.0a उपयोगकर्ता संदर्भ |
| समर्थित HTTP मेथड | PUT | PUT |
| डिफ़ॉल्ट अनुरोध रेट लिमिट्स | 15 मिनट में 10 अनुरोध (सभी प्रमाणीकृत उपयोगकर्ताओं में साझा) | 15 मिनट में 50 अनुरोध (प्रत्येक प्रमाणीकृत उपयोगकर्ता के लिए) |
| जवाब छिपा सकता है | ✔︎ | ✔︎ |
| पहले से छिपाए गए जवाब को फिर से दिखा सकता है | ✔︎ | ✔︎ |
| जवाबों को कई बार छिपा या फिर से दिखा सकता है | ✔︎ | ✔︎ |
| किसी developer App के ऐसे क्रेडेंशियल्स का उपयोग आवश्यक है, जो किसी project से संबद्ध हो | ✔ |
curl -X PUT "https://api.x.com/2/tweets/1234567890/hidden" \
-H "Authorization: OAuth ..." \
-H "Content-Type: application/json" \
-d '{"hidden": true}'
# OAuth 1.0a User Context प्रमाणीकरण आवश्यक है
import requests
from requests_oauthlib import OAuth1
auth = OAuth1(
"API_KEY", "API_SECRET",
"ACCESS_TOKEN", "ACCESS_TOKEN_SECRET"
)
url = "https://api.x.com/2/tweets/1234567890/hidden"
response = requests.put(url, auth=auth, json={"hidden": True})
print(response.json())
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.posts.hide_reply("1234567890", hidden=True)
print(f"Hidden: {response.data.hidden}")
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.posts.hideReply("1234567890", { hidden: true });
console.log(`Hidden: ${response.data?.hidden}`);