Plus (ThinkSNS+)

Plus (ThinkSNS+)

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

›动态

基本

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

用户

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

动态

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

音乐

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

问答

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

资讯

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

圈子

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

评论

  • Send comment
  • Get all comments
  • Get a single comment
  • Delete comment

Send comment

POST /feeds/:feed/comments

Input

NameTypeDescription
bodyStringComment body.
reply_userIntegerReply comment to users.
Response
Status: 201 Created
{
    "message": [
        "操作成功"
    ],
    "comment": {
        "user_id": 1,
        "reply_user": 0,
        "target_user": 1,
        "body": "我是第三条评论",
        "commentable_type": "feeds",
        "commentable_id": 1,
        "updated_at": "2017-07-20 08:53:24",
        "created_at": "2017-07-20 08:53:24",
        "id": 3
    }
}

Get all comments

GET /feeds/:feed/comments

Parameters

NameTypeDescription
limitIntegerList comments limit, By default 20.
afterIntegerThe integer ID of the last Comment that you've seen.
Response
Status: 200 OK
{
    "pinneds": [
        {
            "id": 2,
            "user_id": 1,
            "target_user": 1,
            "reply_user": 0,
            "body": "我是第一条评论",
            "commentable_id": 1,
            "commentable_type": "feeds",
            "created_at": "2017-07-20 08:35:18",
            "updated_at": "2017-07-20 08:35:18"
        }
    ],
    "comments": [
        {
            "id": 3,
            "user_id": 1,
            "target_user": 1,
            "reply_user": 0,
            "body": "我是第三条评论",
            "commentable_id": 1,
            "commentable_type": "feeds",
            "created_at": "2017-07-20 08:53:24",
            "updated_at": "2017-07-20 08:53:24"
        }
    ]
}
NameDescription
pinnedsPinned comments list.
commentComments list.
*.idThe ID of the comment.
*.user_idCommentator.
*.target_userOwn dynamic publisher.
*.reply_userReverted to the user.
*.bodyThe body of the comment.
*.commentable_idFeeds id.
*.commentable_typeCommentable type.
*.created_atComment release time.
*.updated_atComment update time.

Get a single comment

GET /feeds/:feed/comments/:comment
Response
Status: 200 OK
{
    "id": 1,
    "user_id": 1,
    "target_user": 1,
    "reply_user": 0,
    "body": "我是第一条评论",
    "commentable_id": 1,
    "commentable_type": "feeds",
    "created_at": "2017-07-20 08:34:41",
    "updated_at": "2017-07-20 08:34:41"
}
NameDescription
idThe ID of the comment.
user_idCommentator.
target_userOwn dynamic publisher.
reply_userReverted to the user.
bodyThe body of the comment.
commentable_idFeeds id.
commentable_typeCommentable type.
created_atComment release time.
updated_atComment update time.

Delete comment

DELETE /feeds/:feed/comments/:comment
Response
Status: 204 No Content
← 设置评论收费喜欢 →
  • Send comment
  • Get all comments
  • Get a single comment
  • Delete comment
Plus (ThinkSNS+)
More
GitHubStar
Copyright © 2019 Chengdu ZhiYiChuangXiang Technology Co., Ltd. All rights reserved.