Plus (ThinkSNS+)

Plus (ThinkSNS+)

  • 文档 [New]
  • 文档
  • REST API v2
  • 反馈
  • GitHub

›圈子

基本

  • 概述
  • 启动信息
  • Json Web Token 授权
  • 验证码
  • 位置
  • 标签
  • 消息通知
  • 钱包(旧版本)
  • Plus Pay(新钱包-支付工具)
  • 支付能力
  • 文件
  • 关于我们
  • 广告
  • 举报
  • 积分
  • 环信
  • 评论
  • 文件存储

用户

  • 用户
  • 注册
  • 收到的评论
  • 收到的喜欢
  • 关注
  • 标签
  • 身份认证
  • 找人
  • 排行榜
  • 反馈
  • 打赏用户
  • 未读消息
  • 签到
  • 消息

动态

  • 发布动态
  • 获取动态
  • 删除动态
  • 设置评论收费
  • 评论
  • 喜欢
  • 收藏
  • 置顶
  • 打赏
  • 排行榜
  • 举报
  • 积分部分新增接口
  • 话题

音乐

  • 音乐
  • 专辑
  • 点赞
  • 评论
  • 收藏

问答

  • 概述
  • 话题
  • 问题
  • 评论
  • 回答
  • 回答 · 打赏
  • 回答 · 围观
  • 用户 · 关注问题
  • 用户 · 喜欢回答
  • 用户 · 收藏回答
  • 用户 · 申请精选
  • 排行榜
  • 举报
  • 问答部分积分相关新增接口

资讯

  • 概述
  • 分类
  • 投稿
  • 获取
  • 评论
  • 喜欢
  • 打赏
  • 置顶
  • 收藏
  • 排行榜
  • 举报
  • 资讯部分积分相关新增接口

圈子

  • 概述
  • 分类
  • 圈子
  • 圈子 · 管理
  • 圈子 · 举报
  • 圈子 · 成员
  • 帖子
  • 帖子 · 评论
  • 帖子 · 喜欢
  • 帖子 · 收藏
  • 帖子 · 打赏
  • 帖子 · 置顶
  • 圈子部分积分相关新增接口
Edit

帖子 · 置顶

  • 帖子申请置顶列表
  • 申请帖子置顶
  • 通过帖子置顶
  • 拒绝帖子置顶
  • 帖子评论申请置顶列表
  • 帖子评论申请置顶
  • 通过帖子评论申请置顶
  • 拒绝帖子评论申请置顶
  • 圈主和管理员置顶帖子
  • 圈主和管理员取消置顶帖子

帖子申请置顶列表

GET /pinned/posts

参数说明

名称类型说明
limitinteger默认 15 ,数据返回条数 默认为15
afterinteger默认 0 ,数据偏移量,传递之前通过接口获取的总数。
groupinteger默认 全部,某个圈子置顶帖子需传圈子id

响应

status 200
[
    {
        "id": 3,
        "channel": "post",
        "raw": 0,
        "target": 2,
        "user_id": 1,
        "target_user": 1,
        "amount": 200,
        "day": 1,
        "expires_at": null,
        "status": 0,
        "created_at": "2017-11-30 10:42:14",
        "updated_at": "2017-11-30 10:42:14",
        "user": {
            "id": 1,
            "name": "root",
            "bio": null,
            "sex": 0,
            "location": null,
            "created_at": "2017-11-09 08:17:26",
            "updated_at": "2017-11-09 08:17:26",
            "avatar": "http://127.0.0.1/duibi/thinksns-plus/public/api/v2/users/1/avatar",
            "bg": null,
            "verified": null,
            "extra": {
                "user_id": 1,
                "likes_count": 4,
                "comments_count": 4,
                "followers_count": 0,
                "followings_count": 0,
                "updated_at": "2017-11-29 06:50:57",
                "feeds_count": 9,
                "questions_count": 0,
                "answers_count": 0,
                "checkin_count": 0,
                "last_checkin_count": 0,
                "live_zans_count": 0,
                "live_zans_remain": 0,
                "live_time": 0
            }
        },
        "post": {
            "id": 2,
            "group_id": 1,
            "user_id": 1,
            "title": "123123",
            "body": "士大夫",
            "summary": "123123",
            "likes_count": 4,
            "comments_count": 1,
            "views_count": 0,
            "created_at": "2017-11-27 11:20:07",
            "updated_at": "2017-11-29 06:50:57"
        }
    }
]

返回参数说明

名称类型说明
idint数据id
channelstring置顶类型 有comment 评论置顶和post帖子置顶两种,该接口中始终为post
rawint当channel 为comment时为帖子id,该接口中始终为0
targetint帖子id
user_idint申请人id
target_userint申请对方id,该接口中始终等于当前认证用户id
amountint置顶金额,分单位
dayint置顶天数
expires_atdate置顶过期时间 (被拒绝时为拒绝处理的操作时间)
statusint处理状态 0-待审核 1-已通过 2-已拒绝
created_atdate数据创建时间,可视为用户申请时间
userarray申请者用户信息,参考对应用户数据
postarray申请的帖子信息,参考帖子数据

申请帖子置顶

POST /pinned/posts/:post

参数说明

名称类型说明
amountinteger必须 置顶金额
dayinteger必须 置顶天数

响应

status 201

通过帖子置顶

PATCH /pinned/posts/:post/accept

响应

status 201

拒绝帖子置顶

PATCH /pinned/posts/:post/reject

响应

status 201

帖子评论申请置顶列表

GET /pinned/comments

参数说明

名称类型说明
limitinteger默认 15 ,数据返回条数 默认为15
afterinteger默认 0 ,数据偏移量,传递之前通过接口获取的总数。
postinteger默认 全部,某个帖子下的评论置顶需传帖子id

响应

status 200
[
    {
        "id": 4,
        "channel": "comment",
        "raw": 1,
        "target": 4,
        "user_id": 1,
        "target_user": 1,
        "amount": 200,
        "day": 1,
        "expires_at": "2017-12-02 01:57:30",
        "status": 1,
        "created_at": "2017-12-01 01:56:35",
        "updated_at": "2017-12-01 01:57:30",
        "comment": {
            "id": 4,
            "user_id": 1,
            "target_user": 1,
            "reply_user": 0,
            "body": "<http://www.baidu.com>",
            "commentable_id": 1,
            "commentable_type": "group-posts",
            "created_at": "2017-11-27 03:31:38",
            "updated_at": "2017-11-27 03:31:38"
        },
        "user": {
            "id": 1,
            "name": "root",
            "bio": null,
            "sex": 0,
            "location": null,
            "created_at": "2017-11-09 08:17:26",
            "updated_at": "2017-11-09 08:17:26",
            "avatar": "http://127.0.0.1/duibi/thinksns-plus/public/api/v2/users/1/avatar",
            "bg": null,
            "verified": null,
            "extra": {
                "user_id": 1,
                "likes_count": 4,
                "comments_count": 4,
                "followers_count": 0,
                "followings_count": 0,
                "updated_at": "2017-11-29 06:50:57",
                "feeds_count": 9,
                "questions_count": 0,
                "answers_count": 0,
                "checkin_count": 0,
                "last_checkin_count": 0,
                "live_zans_count": 0,
                "live_zans_remain": 0,
                "live_time": 0
            }
        },
        "post": {
            "id": 1,
            "group_id": 1,
            "user_id": 1,
            "title": "123123",
            "body": "士大夫",
            "summary": "",
            "likes_count": 4,
            "comments_count": 1,
            "views_count": 0,
            "created_at": "2017-11-27 11:20:07",
            "updated_at": "2017-11-29 06:50:57"
        }
    }
]

返回参数说明

名称类型说明
idint数据id
channelstring置顶类型 有comment 评论置顶和post帖子置顶两种,该接口中始终为comment
rawint当channel 为comment时为帖子id,该接口中始终为对应的帖子id
targetint帖子id
user_idint申请人id
target_userint申请对方id,该接口中始终等于当前认证用户id
amountint置顶金额,分单位
dayint置顶天数
expires_atdate置顶过期时间 (被拒绝时为拒绝处理的操作时间)
statusint处理状态 0-待审核 1-已通过 2-已拒绝
created_atdate数据创建时间,可视为用户申请时间
userarray申请者用户信息,参考对应用户数据
postarray对应的帖子信息,参考帖子数据
commentarray申请置顶的评论信息,参考评论数据

帖子评论申请置顶

POST /pinned/comments/:comment

参数说明

名称类型说明
amountinteger必须 置顶金额
dayinteger必须 置顶天数

响应

status 201

通过帖子评论申请置顶

PATCH /pinned/comments/:comment/accept

响应

status 201

拒绝帖子评论申请置顶

PATCH /pinned/comments/:comment/reject

响应

status 201

圈主和管理员置顶帖子

POST /pinned/posts/:post/create

参数说明

名称类型说明
dayinteger必须 置顶天数

响应

status 201

圈主和管理员取消置顶帖子

PATCH /pinned/posts/:post/cancel

响应

status 201
← 帖子 · 打赏圈子部分积分相关新增接口 →
  • 帖子申请置顶列表
    • 参数说明
    • 响应
    • 返回参数说明
  • 申请帖子置顶
    • 参数说明
    • 响应
  • 通过帖子置顶
    • 响应
  • 拒绝帖子置顶
    • 响应
  • 帖子评论申请置顶列表
    • 参数说明
    • 响应
    • 返回参数说明
  • 帖子评论申请置顶
    • 参数说明
    • 响应
  • 通过帖子评论申请置顶
    • 响应
  • 拒绝帖子评论申请置顶
    • 响应
  • 圈主和管理员置顶帖子
    • 参数说明
    • 响应
  • 圈主和管理员取消置顶帖子
    • 响应
Plus (ThinkSNS+)
More
GitHubStar
Copyright © 2019 Chengdu ZhiYiChuangXiang Technology Co., Ltd. All rights reserved.