curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"id": "4HZhptaD5", "useFirstImage": true, "autoHashtag": true}' \
-X PUT https://api.ayrshare.com/api/feed
const API_KEY = "API_KEY";
const id = "4HZhptaD5";
fetch("https://api.ayrshare.com/api/feed", {
method: "PUT",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({ id, "useFirstImage": true, "autoHashtag": true }),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.err
import requests
payload = {'id': '4HZhptaD5', 'useFirstImage': True, 'autoHashtag': True}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
r = requests.put('https://api.ayrshare.com/api/feed',
json=payload,
headers=headers)
print(r.json())
$curl = curl_init();
$data = array (
'id' => '_3yhtyd88',
'useFirstImage' => false,
'autoHashtag' => true
);
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.ayrshare.com/api/feed',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => http_build_query($data),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer API_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{
"status": "success",
"id": "vVYX3cgJ7"
}
{
"action": "update",
"status": "error",
"code": 304,
"message": "The feed with id vVYX3cgJ does not exist."
}
Feed
更新 RSS 订阅源
更新 RSS 订阅源
PUT
/
feed
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"id": "4HZhptaD5", "useFirstImage": true, "autoHashtag": true}' \
-X PUT https://api.ayrshare.com/api/feed
const API_KEY = "API_KEY";
const id = "4HZhptaD5";
fetch("https://api.ayrshare.com/api/feed", {
method: "PUT",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({ id, "useFirstImage": true, "autoHashtag": true }),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.err
import requests
payload = {'id': '4HZhptaD5', 'useFirstImage': True, 'autoHashtag': True}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
r = requests.put('https://api.ayrshare.com/api/feed',
json=payload,
headers=headers)
print(r.json())
$curl = curl_init();
$data = array (
'id' => '_3yhtyd88',
'useFirstImage' => false,
'autoHashtag' => true
);
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.ayrshare.com/api/feed',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => http_build_query($data),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer API_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{
"status": "success",
"id": "vVYX3cgJ7"
}
{
"action": "update",
"status": "error",
"code": 304,
"message": "The feed with id vVYX3cgJ does not exist."
}
请求头参数
请求体参数
RSS 订阅源 POST 接口返回的 RSS 订阅源 ID。
尝试获取文章中的第一张或顶部图片并将其添加到帖子。
根据最相关的关键词自动为帖子文本添加最多 3 个 hashtag。
curl \
-H "Authorization: Bearer API_KEY" \
-H 'Content-Type: application/json' \
-d '{"id": "4HZhptaD5", "useFirstImage": true, "autoHashtag": true}' \
-X PUT https://api.ayrshare.com/api/feed
const API_KEY = "API_KEY";
const id = "4HZhptaD5";
fetch("https://api.ayrshare.com/api/feed", {
method: "PUT",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${API_KEY}`
},
body: JSON.stringify({ id, "useFirstImage": true, "autoHashtag": true }),
})
.then((res) => res.json())
.then((json) => console.log(json))
.catch(console.err
import requests
payload = {'id': '4HZhptaD5', 'useFirstImage': True, 'autoHashtag': True}
headers = {'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'}
r = requests.put('https://api.ayrshare.com/api/feed',
json=payload,
headers=headers)
print(r.json())
$curl = curl_init();
$data = array (
'id' => '_3yhtyd88',
'useFirstImage' => false,
'autoHashtag' => true
);
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.ayrshare.com/api/feed',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => http_build_query($data),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer API_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
{
"status": "success",
"id": "vVYX3cgJ7"
}
{
"action": "update",
"status": "error",
"code": 304,
"message": "The feed with id vVYX3cgJ does not exist."
}
⌘I
