Logo
1号公社 API Documentation

频道首页

POST http://127.0.0.1:10003/one/commune/channel-post

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
user
number




RESPONSES

status OK

{ "code": 200, "message": "操作成功", "data": { "content": [ { "id": "123444",//帖子id "name": "123444",//标题 "content": "这是帖子内容", "authorName": "作者昵称", "authorAvatar": "作者头像", "authorType": "作者身份", // 1成员 2管理员 3社长 "thumbnails": ["www.baidu.com"], //缩略图地址 "commentNum": 1, // 评论数 "publishTime": "2022-02-22T11:00:33.000+00:00", //发布时间 "likes": [ { "type": 1, //1喜欢 2不喜欢 3疑问 "num":5 }, { "type": 2, "num":1 } ], "hotComments": [ { "id": "123444",//评论id "userId": "1111", "userName": "1111", "content": "这是评论内容", "sort": 3 //排序 数字越大,热度越高 }, { "id": "1234444",//评论id "userId": "11111", "userName": "11111", "content": "这是评论内容2", "sort": 2 } ] } ], "total": "1", "pageNo": "1", "pageSize": "4" } }



Curl
curl -X POST 'http://127.0.0.1:10003/one/commune/channel-post' -H 'user: 1100' -d '{"channelId":"110","orderBy":1,"pageNo":1,"pageSize":4}'

ENDPOINTS