渠道管理/内容发布
修改发布时间
接口说明:修改待发布任务的发布时间
PATCH
/
api
/
v2
/
channels
/
publish
/
tasks
/
{taskId}
/
publish-at
修改发布时间
curl --request PATCH \
--url https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/publish-at \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"publishAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/publish-at"
payload = { "publishAt": "2023-11-07T05:31:56Z" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({publishAt: '2023-11-07T05:31:56Z'})
};
fetch('https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/publish-at', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/publish-at"
payload := strings.NewReader("{\n \"publishAt\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": 0,
"message": "请求成功",
"data": {
"taskId": "string"
}
}⌘I
修改发布时间
curl --request PATCH \
--url https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/publish-at \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"publishAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/publish-at"
payload = { "publishAt": "2023-11-07T05:31:56Z" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({publishAt: '2023-11-07T05:31:56Z'})
};
fetch('https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/publish-at', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://aitoearn.cn/api/v2/channels/publish/tasks/{taskId}/publish-at"
payload := strings.NewReader("{\n \"publishAt\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": 0,
"message": "请求成功",
"data": {
"taskId": "string"
}
}
