Get Following Channels
curl --request GET \
--url https://api.reportify.cn/v1/channels/followings \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reportify.cn/v1/channels/followings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reportify.cn/v1/channels/followings', 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/channels/followings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reportify.cn/v1/channels/followings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.reportify.cn/v1/channels/followings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/channels/followings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"channels": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"avatar_url": "<string>",
"following": false
}
],
"total_count": 0,
"total_page": 0,
"page_num": 1,
"page_size": 10
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}账号关注
Channel Followings
Get list of channels user is following
GET
/
v1
/
channels
/
followings
Get Following Channels
curl --request GET \
--url https://api.reportify.cn/v1/channels/followings \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reportify.cn/v1/channels/followings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reportify.cn/v1/channels/followings', 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/channels/followings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.reportify.cn/v1/channels/followings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.reportify.cn/v1/channels/followings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/channels/followings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"channels": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"avatar_url": "<string>",
"following": false
}
],
"total_count": 0,
"total_page": 0,
"page_num": 1,
"page_size": 10
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}获取用户关注的账号列表
URL:/v1/channels/followings方法:
GET描述: 关注账号列表
请求参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| page_num | int | 当前页码,默认值为 1。 |
| page_size | int | 每页条目数,默认值为 10。 |
响应参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| page_num | int | 当前页码。 |
| page_size | int | 每页条目数。 |
| total_page | int | 总页数。 |
| total_count | int | 总条目数。 |
| channels | array | 文档数组,每个文档包含以下字段: |
| id | str | 账号唯一 ID。 |
| name | str | 账号名称。 |
| avatar_url | str | 账号头像。 |
| description | str | 账号描述。 |
| following | bool | 账号关注状态。 |
Authorizations
Enter your Bearer token
⌘I
