Public Media Timeline
curl --request POST \
--url https://api.reportify.cn/v1/tools/timeline/public-media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"num": 10,
"page": 1
}
'import requests
url = "https://api.reportify.cn/v1/tools/timeline/public-media"
payload = {
"num": 10,
"page": 1
}
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({num: 10, page: 1})
};
fetch('https://api.reportify.cn/v1/tools/timeline/public-media', 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/tools/timeline/public-media",
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([
'num' => 10,
'page' => 1
]),
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/tools/timeline/public-media"
payload := strings.NewReader("{\n \"num\": 10,\n \"page\": 1\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/tools/timeline/public-media")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"num\": 10,\n \"page\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/tools/timeline/public-media")
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 \"num\": 10,\n \"page\": 1\n}"
response = http.request(request)
puts response.read_body{
"docs": [],
"total_count": 0,
"took_ms": 0,
"page": 1,
"total_page": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}账号关注
Public Media Timeline
Document feed for the public media I follow
POST
/
v1
/
tools
/
timeline
/
public-media
Public Media Timeline
curl --request POST \
--url https://api.reportify.cn/v1/tools/timeline/public-media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"num": 10,
"page": 1
}
'import requests
url = "https://api.reportify.cn/v1/tools/timeline/public-media"
payload = {
"num": 10,
"page": 1
}
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({num: 10, page: 1})
};
fetch('https://api.reportify.cn/v1/tools/timeline/public-media', 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/tools/timeline/public-media",
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([
'num' => 10,
'page' => 1
]),
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/tools/timeline/public-media"
payload := strings.NewReader("{\n \"num\": 10,\n \"page\": 1\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/tools/timeline/public-media")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"num\": 10,\n \"page\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/tools/timeline/public-media")
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 \"num\": 10,\n \"page\": 1\n}"
response = http.request(request)
puts response.read_body{
"docs": [],
"total_count": 0,
"took_ms": 0,
"page": 1,
"total_page": 0
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}关注公众号时间线
URL:/v1/tools/timeline/public-media方法:
POST描述: 获取用户关注的公众号最新动态时间线。
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| num | integer | 否 | 返回结果数量,默认 10,范围 1-100 |
响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| docs | array | 文档列表 |
| doc_id | string | 文档 ID |
| title | string | 文档标题 |
| summary | string | 文档摘要 |
| category | string | 文档类别 |
| published_at | string | 发布时间 |
| source | string | 来源 |
| channel_name | string | 渠道名称 |
| symbols | array | 相关股票代码列表 |
| total_count | integer | 匹配文档总数 |
| took_ms | integer | 查询耗时(毫秒) |
请求示例
cURLcurl -X POST "https://api.reportify.cn/v1/tools/timeline/public-media" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"num": 20}'
import requests
url = "https://api.reportify.cn/v1/tools/timeline/public-media"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {"num": 20}
response = requests.post(url, headers=headers, json=data)
timeline = response.json()
for doc in timeline["docs"]:
print(f"[{doc['channel_name']}] {doc['title']}")
const response = await fetch('https://api.reportify.cn/v1/tools/timeline/public-media', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({ num: 20 })
});
const data = await response.json();
console.log(`Found ${data.total_count} public media articles`);
响应示例
{
"docs": [
{
"doc_id": "doc_pm123",
"title": "深度解读:新能源汽车行业2024年展望",
"summary": "2024年新能源汽车行业将迎来新的发展机遇...",
"category": "news",
"published_at": "2024-01-15T12:00:00Z",
"source": "新能源观察",
"channel_name": "新能源观察公众号",
"symbols": ["CN:300750", "HK:01211"]
}
],
"total_count": 120,
"took_ms": 35
}
错误响应
| 状态码 | 描述 |
|---|---|
| 422 | 请求参数验证失败 |
Authorizations
Enter your Bearer token
Body
application/json
Response
Successful Response
Response model for timeline tools
