用户是网站的基本成员.
用户
粉丝
偶像
微刊
标签
消息
GET /v2/users/:id
参数名 | 值类型 | 描述 |
---|---|---|
id | string{32} | 用户的 id |
无
{
id: string // 用户的id
avatar: string //用户头像
nickname: string // 昵称, 默认为 id, 可修改一次
urlToken: string // 个性域名, 默认为 id, 可修改一次
defaultCollectionsId:string 默认收藏夹id
createTime: number // 注册时间, Unix 时间戳
idolCount: number // 正在关注数量
fansCount: number // 粉丝数量
collectionsCount: number // 微刊数量
followCollectionsCount: number // 关注的微刊数量
followTagsCount: number // 关注的标签数量
}
GET /v2/users/:userId/fans/:fansId
HEAD /v2/users/:userId/fans/:fansId
参数名 | 值类型 | 描述 |
---|---|---|
userId | string{32} | 用户的 id |
fansId | string | 粉丝的用户id |
无
如果存在, 302 跳转至 /users/:fansId
DELETE /v2/users/:userId/fans/:fansId
参数名 | 值类型 | 描述 |
---|---|---|
userId | string{32} | 用户的 id |
fansId | string | 粉丝的用户id |
无
GET /v2/users/:id/fans
参数名 | 值类型 | 描述 |
---|---|---|
id | string{32} | 用户的 id |
无
count:100
通常情况下返回:
[users]
POST /v2/users/:id/idol
参数名 | 值类型 | 描述 |
---|---|---|
id | string{32} | 用户的 id |
{
id:string, // 偶像id
visible:boolean// 是否可见
}
无
GET /v2/users/:userId/idol/:idolUserId
HEAD /v2/users/:userId/idol/:idolUserId
参数 | 值类型 | 描述 |
---|---|---|
userId | string{32} | 用户的 id |
idolUserId | 需要查询的正在粉丝 id |
无
如果存在, 302 跳转至 /users/:userId
DELETE /v2/users/:userId/idol/:idolUserId
参数 | 值类型 | 描述 |
---|---|---|
userId | string{32} | 用户的 id |
idolUserId | 需要查询的正在粉丝 id |
无
GET /v2/users/:id/idol
参数名 | 值类型 | 描述 |
---|---|---|
id | string{32} | 用户的 id |
无
count:100
通常情况下返回:
[users]
POST /v2/users/:id/followingCollections
参数名 | 值类型 | 描述 |
---|---|---|
id | string{32} | 用户的 id |
{
id: string // 微刊的 id
visible: boolen// 是否可见,非悄悄关注
special:int // 特别关注。置顶。权重
}
无
GET /v2/users/:id/collections
参数名 | 值类型 | 描述 |
---|---|---|
id | string{32} | 用户的 id |
无
count:100
通常情况下返回:
[collections]
GET /v2/users/:userId/followingCollections/:collectionId
HEAD /v2/users/:userId/followingCollections/:collectionId
参数名 | 值类型 | 描述 |
---|---|---|
userId | string{32} | 用户的 id |
collectionId | string | 微刊的 id |
无
如果该用户关注了此微刊, 302 跳转到 /v2/collections/:collectionId
GET /v2/users/:id/followingCollections
参数名 | 值类型 | 描述 |
---|---|---|
id | string{32} | 用户的 id |
special | boolean | 是否只要特殊关注,true 返回特殊关注;false返回 全部,按 特殊关注权重倒叙。默认false |
无
count:100
通常情况下返回:
[collections]
DELETE /v2/users/:userId/followingCollections/:collectionId
参数名 | 值类型 | 描述 |
---|---|---|
userId | string{32} | 用户的 id |
collectionId | string | 微刊的 id |
无
无
POST /v2/users/:id/tags
参数名 | 值类型 | 描述 |
---|---|---|
id | string{32} | 用户的 id |
{
id: string // tag的 id
visible: boolen// 是否可见,非悄悄关注
special:int // 特别关注。置顶。权重。权重高,查询我关注的标签时,该标签就越靠前。为0 则 不是特别关注。
}
无
POST /v2/users/:id/tagName
参数名 | 值类型 | 描述 |
---|---|---|
id | string{32} | 用户的 id |
{
tagName: string // 标签名字
visible: boolen// 是否可见,非悄悄关注
special:int // 特别关注。置顶。权重
}
无
GET /v2/users/:userId/tags/:tagId
HEAD /v2/users/:userId/tags/:tagId
参数名 | 值类型 | 描述 |
---|---|---|
userId | string{32} | 用户的 id |
tagId | string | 标签id |
无
如果存在, 跳转到 /tags/:tagId
GET /v2/users/:userId/tagName/:tagName
HEAD /v2/users/:userId/tagName/:tagName
参数名 | 值类型 | 描述 |
---|---|---|
userId | string{32} | 用户的 id |
tagName | string | 标签名 |
无
如果存在, 跳转到 /tags/:tagName
GET /v2/users/:id/tags
GET /v2/users/:id/tags_id
参数名 | 值类型 | 描述 |
---|---|---|
id | string{32} | 用户的 id |
special | boolean | 是否只要特殊关注,true 返回特殊关注;false返回 全部,按 特殊关注权重倒叙。默认false |
无
count:100
通常情况下返回:
[tags]
[ids]
DELETE /v2/users/:userId/tags/:tagId
参数名 | 值类型 | 描述 |
---|---|---|
userId | string{32} | 用户的 id |
tagId | string{32} | 标签id |
无
无
GET /v2/users/:userId/tagName/:tagName
HEAD /v2/users/:userId/tagName/:tagName
参数名 | 值类型 | 描述 |
---|---|---|
userId | string{32} | 用户的 id |
tagName | string | 标签名 |
无
无
GET /v2/users/:userId/message
参数名 | 值类型 | 描述 |
---|---|---|
userId | string{32} | 用户的 id |
无
[
{
"type": 1,//类型,1是专集消息
"title": "",//展示头部
"body": ""//消息内容。
}
]
body里内容
{collections}, //专集介绍
title:"",//标题
[atricles]//文章列表