You need to enable JavaScript to run this app.
导航

获取“已关注作者”列表

最近更新时间2023.02.28 17:57:49

首次发布时间2021.10.18 11:12:18

调用该接口,拉取用户关注的所有作者列表。

请求方式

请求方法

GET/POST(Content-Type: application/x-www-form-urlencoded)

请求url

https://mercury.volcengineapi.com/?Action=FollowList&Version=2021-01-01

请求header

ServiceName:content

请求参数

参数描述类型是否必填说明
Partner渠道号String
AccessToken用户唯一标识String

Cursor

索引

int

首次传0,翻页(LoadMore)的时候传上一次火山引擎返回的Cursor;
默认为0。

Count指定返回的条数int用于指定返回多少条数据,默认20

响应参数

参数
描述
类型
说明
Result
响应结果
Result

请求示例

public static void main(String[] args) {
    //初始化一个service
    StreamConsumerService streamConsumerService = StreamConsumerServiceImpl.getInstance();

    //设置ak,sk 此为请求的凭证
    streamConsumerService.setAccessKey("ak");
    streamConsumerService.setSecretKey("sk");
    //初始化一个request
    FollowListRequest req = new FollowListRequest();
    req.setTimestamp(LocalDateTime.now().toEpochSecond(ZoneOffset.of("+8")));
    req.setAccessToken("accessToken");
    req.setPartner("partner");
    req.setCursor(0);
    req.setCount(2);
    try {
        FollowListResponse response = streamConsumerService.followList(req);
        System.out.println(JSON.toJSONString(response));
    } catch (Exception e) {
        e.printStackTrace();
    }
}

响应示例

{
    "ResponseMetadata":{
        "Action":"FollowList",
        "Region":"cn-north-1",
        "RequestId":"20221028201423010208045153060C36DB",
        "Service":"content",
        "Version":"2021-01-01"
    },
    "Result":{
        "Cursor":2,
        "Data":[
            {
                "Info":{
                    "AuthType":"3",
                    "AvatarUrl":"url",
                    "Description":"Description",
                    "Follow":false,
                    "FollowersCount":111,
                    "HomePage":"HomePageUrl",
                    "MediaId":0,
                    "Name":"Name",
                    "UserId":123123,
                    "UserVerified":true,
                    "VerifiedContent":""
                },
                "Relation":{
                    "FollowTime":123123,
                    "FollowersCount":123123,
                    "FollowingsCount":0,
                    "IsFollowing":1,
                    "UpdateArticleTime":0
                }
            },
            "Info":{
                    "AuthType":"3",
                    "AvatarUrl":"url",
                    "Description":"Description",
                    "Follow":false,
                    "FollowersCount":111,
                    "HomePage":"HomePageUrl",
                    "MediaId":0,
                    "Name":"Name",
                    "UserId":123123,
                    "UserVerified":true,
                    "VerifiedContent":""
                },
                "Relation":{
                    "FollowTime":123123,
                    "FollowersCount":123123,
                    "FollowingsCount":0,
                    "IsFollowing":1,
                    "UpdateArticleTime":0
                }
            }
        ],
        "HasMore":true,
        "Total":6
    }
}