147 lines
3.6 KiB
JSON
147 lines
3.6 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "CNB OPENAPI",
|
|
"contact": {
|
|
"name": "Open API Support",
|
|
"url": "https://docs.cnb.cool/",
|
|
"email": "cnb@tencent.com"
|
|
},
|
|
"version": "1.0"
|
|
},
|
|
"paths": {
|
|
"/users/{username}/followers": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/vnd.cnb.api+json"
|
|
],
|
|
"tags": [
|
|
"Followers"
|
|
],
|
|
"summary": "获取指定用户的粉丝列表。Get the followers list of specified user.",
|
|
"operationId": "GetFollowersByUserID",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Username",
|
|
"name": "username",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "Pagination page number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "Pagination page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/dto.UserFollowResult"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r"
|
|
}
|
|
},
|
|
"/users/{username}/following": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/vnd.cnb.api+json"
|
|
],
|
|
"tags": [
|
|
"Followers"
|
|
],
|
|
"summary": "获取指定用户的关注人列表。Get the list of users that the specified user is following.",
|
|
"operationId": "GetFollowingByUserID",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Username",
|
|
"name": "username",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 1,
|
|
"description": "Pagination page number",
|
|
"name": "page",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"default": 10,
|
|
"description": "Pagination page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/dto.UserFollowResult"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "访问令牌调用此接口需包含以下权限。Required permissions for access token. \naccount-engage:r"
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"dto.UserFollowResult": {
|
|
"type": "object",
|
|
"properties": {
|
|
"freeze": {
|
|
"type": "boolean"
|
|
},
|
|
"is_following": {
|
|
"description": "查询人是否follow了此用户",
|
|
"type": "boolean"
|
|
},
|
|
"locked": {
|
|
"type": "boolean"
|
|
},
|
|
"nickname": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |