Update Topic
curl --request POST \
--url https://api.reportify.cn/v1/followings/topics/{follow_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"meta_data": {},
"title": "<string>"
}
'import requests
url = "https://api.reportify.cn/v1/followings/topics/{follow_id}"
payload = {
"query": "<string>",
"meta_data": {},
"title": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>', meta_data: {}, title: '<string>'})
};
fetch('https://api.reportify.cn/v1/followings/topics/{follow_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reportify.cn/v1/followings/topics/{follow_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>',
'meta_data' => [
],
'title' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.reportify.cn/v1/followings/topics/{follow_id}"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"meta_data\": {},\n \"title\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://api.reportify.cn/v1/followings/topics/{follow_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"meta_data\": {},\n \"title\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/followings/topics/{follow_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"meta_data\": {},\n \"title\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"follow_id": "<string>",
"follow_type": 123,
"follow_sub_type": 123,
"follow_value": "<string>",
"name": "<string>",
"logo": "<string>",
"title": "<string>",
"followed_at": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}账号关注
Update Topic
Update an existing topic following
POST
/
v1
/
followings
/
topics
/
{follow_id}
Update Topic
curl --request POST \
--url https://api.reportify.cn/v1/followings/topics/{follow_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"meta_data": {},
"title": "<string>"
}
'import requests
url = "https://api.reportify.cn/v1/followings/topics/{follow_id}"
payload = {
"query": "<string>",
"meta_data": {},
"title": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>', meta_data: {}, title: '<string>'})
};
fetch('https://api.reportify.cn/v1/followings/topics/{follow_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reportify.cn/v1/followings/topics/{follow_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>',
'meta_data' => [
],
'title' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.reportify.cn/v1/followings/topics/{follow_id}"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"meta_data\": {},\n \"title\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://api.reportify.cn/v1/followings/topics/{follow_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"meta_data\": {},\n \"title\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/followings/topics/{follow_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"meta_data\": {},\n \"title\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"follow_id": "<string>",
"follow_type": 123,
"follow_sub_type": 123,
"follow_value": "<string>",
"name": "<string>",
"logo": "<string>",
"title": "<string>",
"followed_at": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}说明
URL:/v1/followings/topics/{follow_id}
方法: POST描述: 编辑话题,更新已存在的话题关注,返回更新后的关注项。
请求参数
| 参数名 | 类型 | 必填 | 位置 | 描述 |
|---|---|---|---|---|
| follow_id | str | 是 | path | 话题关注 ID。 |
| query | str | 是 | body | 话题查询文本。 |
| meta_data | object | 否 | body | 可选的话题范围限定信息。 |
| title | str | 否 | body | 话题标题。 |
响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| follow_id | str | 关注 ID。 |
| follow_type | int | 关注类型:1 公司,2 话题,3 渠道。 |
| follow_sub_type | int | 关注子类型:1 机构,2 媒体,3 社交。 |
| follow_value | str | 关注对象的取值。 |
| name | str | 名称。 |
| logo | str | 图标 URL。 |
| title | str | 标题。 |
| followed_at | int | 关注时间戳(毫秒)。 |
请求示例
cURLcurl -X POST https://api.reportify.cn/v1/followings/topics/2002 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "AI 芯片行业趋势与供应链",
"title": "AI 芯片行业趋势"
}'
import requests
follow_id = "2002"
url = f"https://api.reportify.cn/v1/followings/topics/{follow_id}"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"query": "AI 芯片行业趋势与供应链",
"title": "AI 芯片行业趋势"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
响应示例
{
"follow_id": "2002",
"follow_type": 2,
"follow_sub_type": 0,
"follow_value": "AI 芯片行业趋势与供应链",
"name": "AI 芯片行业趋势",
"logo": "",
"title": "AI 芯片行业趋势",
"followed_at": 1720000100000
}
错误响应
| 状态码 | 描述 |
|---|---|
| 422 | 请求参数验证失败。 |
Authorizations
Enter your Bearer token
Path Parameters
Follow ID
Body
application/json
⌘I
