239 lines
5.6 KiB
Markdown
239 lines
5.6 KiB
Markdown
# Post
|
||
|
||
推文相关操作
|
||
|
||
- [/feed.Post/Fetch](#feedpostfetch)
|
||
- [/feed.Post/Create](#feedpostcreate)
|
||
- [/feed.Post/Change](#feedpostchange)
|
||
- [/feed.Post/Remove](#feedpostremove)
|
||
- [/feed.Post/CommentList](#feedpostcommentlist)
|
||
- [/feed.Post/AddComment](#feedpostaddcomment)
|
||
- [/feed.Post/DeleteComment](#feedpostdeletecomment)
|
||
- [/feed.Post/Action](#feedpostaction)
|
||
|
||
## /feed.Post/Fetch
|
||
|
||
推文列表
|
||
|
||
|
||
### Request
|
||
```javascript
|
||
{
|
||
page_no: "0", // type<int64>, 页数
|
||
page_size: "0", // type<int64>, 每页记录数
|
||
params: {
|
||
"": ""
|
||
}, // map<string,string>, 条件参数,key=val,eg key:category_id=?,vlaue=11
|
||
}
|
||
```
|
||
|
||
### Reply
|
||
```javascript
|
||
{
|
||
list: [{
|
||
identity: "", // type<string>, 唯一标识
|
||
content: "", // type<string>, 内容
|
||
feed_id: "0", // type<int64>, 通行证ID
|
||
feed_identity: "", // type<string>, 通行证Identity
|
||
is_open: false, // type<bool>, 是否公开:默认为0-公开,1-不公开
|
||
cnt_unlike: "0", // type<int64>, 点踩数量
|
||
cnt_comment: "0", // type<int64>, 评论数量
|
||
cnt_like: "0", // type<int64>, 点赞数量
|
||
attachs: [{
|
||
identity: "", // type<string>, 唯一标识
|
||
attach_type: "", // type<string>, 文件类型
|
||
url: "", // type<string>, 文件路径
|
||
}], // list<AttachItem>, 附件信息
|
||
tags: [{
|
||
key: "", // type<string>, 标签唯一码
|
||
content: "", // type<string>, 标签内容
|
||
}], // list<TagItem>, 所属话题
|
||
}], // list<PostItem>
|
||
cnt: "0", // type<int64>
|
||
}
|
||
```
|
||
## /feed.Post/Create
|
||
|
||
新建推文
|
||
|
||
|
||
### Request
|
||
```javascript
|
||
{
|
||
identity: "", // type<string>, 唯一标识
|
||
content: "", // type<string>, 内容
|
||
feed_id: "0", // type<int64>, 通行证ID
|
||
feed_identity: "", // type<string>, 通行证Identity
|
||
is_open: false, // type<bool>, 是否公开:默认为0-公开,1-不公开
|
||
cnt_unlike: "0", // type<int64>, 点踩数量
|
||
cnt_comment: "0", // type<int64>, 评论数量
|
||
cnt_like: "0", // type<int64>, 点赞数量
|
||
attachs: [{
|
||
identity: "", // type<string>, 唯一标识
|
||
attach_type: "", // type<string>, 文件类型
|
||
url: "", // type<string>, 文件路径
|
||
}], // list<AttachItem>, 附件信息
|
||
tags: [{
|
||
key: "", // type<string>, 标签唯一码
|
||
content: "", // type<string>, 标签内容
|
||
}], // list<TagItem>, 所属话题
|
||
}
|
||
```
|
||
|
||
### Reply
|
||
```javascript
|
||
{
|
||
data: "", // type<string>, 数据
|
||
timeseq: "0", // type<int64>, 响应时间序列
|
||
}
|
||
```
|
||
## /feed.Post/Change
|
||
|
||
修改推文
|
||
|
||
|
||
### Request
|
||
```javascript
|
||
{
|
||
identity: "", // type<string>, 唯一标识
|
||
content: "", // type<string>, 内容
|
||
feed_id: "0", // type<int64>, 通行证ID
|
||
feed_identity: "", // type<string>, 通行证Identity
|
||
is_open: false, // type<bool>, 是否公开:默认为0-公开,1-不公开
|
||
cnt_unlike: "0", // type<int64>, 点踩数量
|
||
cnt_comment: "0", // type<int64>, 评论数量
|
||
cnt_like: "0", // type<int64>, 点赞数量
|
||
attachs: [{
|
||
identity: "", // type<string>, 唯一标识
|
||
attach_type: "", // type<string>, 文件类型
|
||
url: "", // type<string>, 文件路径
|
||
}], // list<AttachItem>, 附件信息
|
||
tags: [{
|
||
key: "", // type<string>, 标签唯一码
|
||
content: "", // type<string>, 标签内容
|
||
}], // list<TagItem>, 所属话题
|
||
}
|
||
```
|
||
|
||
### Reply
|
||
```javascript
|
||
{
|
||
data: "", // type<string>, 数据
|
||
timeseq: "0", // type<int64>, 响应时间序列
|
||
}
|
||
```
|
||
## /feed.Post/Remove
|
||
|
||
删除推文
|
||
|
||
|
||
### Request
|
||
```javascript
|
||
{
|
||
id: "0", // type<int64>, 唯一ID
|
||
identity: "", // type<string>, 唯一码
|
||
}
|
||
```
|
||
|
||
### Reply
|
||
```javascript
|
||
{
|
||
data: "", // type<string>, 数据
|
||
timeseq: "0", // type<int64>, 响应时间序列
|
||
}
|
||
```
|
||
## /feed.Post/CommentList
|
||
|
||
评论列表
|
||
|
||
|
||
### Request
|
||
```javascript
|
||
{
|
||
page_no: "0", // type<int64>, 页数
|
||
page_size: "0", // type<int64>, 每页记录数
|
||
params: {
|
||
"": ""
|
||
}, // map<string,string>, 条件参数,key=val,eg key:category_id=?,vlaue=11
|
||
}
|
||
```
|
||
|
||
### Reply
|
||
```javascript
|
||
{
|
||
list: [{
|
||
identity: "", // type<string>, 评论identity
|
||
post_identity: "", // type<string>, 被评论唯一标识
|
||
feed_identity: "", // type<string>, 评论人唯一标识
|
||
content: "", // type<string>, 评论内容
|
||
sub_comment: [{}], // list<CommentItem>, 子评论
|
||
}], // list<CommentItem>, 评论列表
|
||
total: "0", // type<int64>
|
||
}
|
||
```
|
||
## /feed.Post/AddComment
|
||
|
||
新建评论
|
||
|
||
|
||
### Request
|
||
```javascript
|
||
{
|
||
identity: "", // type<string>, 评论identity
|
||
post_identity: "", // type<string>, 被评论唯一标识
|
||
feed_identity: "", // type<string>, 评论人唯一标识
|
||
content: "", // type<string>, 评论内容
|
||
sub_comment: [{}], // list<CommentItem>, 子评论
|
||
}
|
||
```
|
||
|
||
### Reply
|
||
```javascript
|
||
{
|
||
data: "", // type<string>, 数据
|
||
timeseq: "0", // type<int64>, 响应时间序列
|
||
}
|
||
```
|
||
## /feed.Post/DeleteComment
|
||
|
||
删除评论
|
||
|
||
|
||
### Request
|
||
```javascript
|
||
{
|
||
id: "0", // type<int64>, 唯一ID
|
||
identity: "", // type<string>, 唯一码
|
||
}
|
||
```
|
||
|
||
### Reply
|
||
```javascript
|
||
{
|
||
data: "", // type<string>, 数据
|
||
timeseq: "0", // type<int64>, 响应时间序列
|
||
}
|
||
```
|
||
## /feed.Post/Action
|
||
|
||
计数操作
|
||
|
||
|
||
### Request
|
||
```javascript
|
||
{
|
||
action_op: "", // type<string>, 操作运作:ilike,unlike
|
||
action_type: "", // type<string>, 类别:推文,评论
|
||
identity: "", // type<string>, 唯一标识
|
||
}
|
||
```
|
||
|
||
### Reply
|
||
```javascript
|
||
{
|
||
data: "", // type<string>, 数据
|
||
timeseq: "0", // type<int64>, 响应时间序列
|
||
}
|
||
```
|
||
|