client/docs/cms/post.md

772 lines
25 KiB
Markdown

# Post
正文
- [/cms.Post/Fetch](#cmspostfetch)
- [/cms.Post/GetByIdentity](#cmspostgetbyidentity)
- [/cms.Post/GetByKey](#cmspostgetbykey)
- [/cms.Post/Search](#cmspostsearch)
- [/cms.Post/Create](#cmspostcreate)
- [/cms.Post/Modify](#cmspostmodify)
- [/cms.Post/Delete](#cmspostdelete)
- [/cms.Post/IncrPostLike](#cmspostincrpostlike)
- [/cms.Post/DescPostLike](#cmspostdescpostlike)
- [/cms.Post/IncrPostUnlike](#cmspostincrpostunlike)
- [/cms.Post/DescPostUnlike](#cmspostdescpostunlike)
- [/cms.Post/CommentList](#cmspostcommentlist)
- [/cms.Post/AddComment](#cmspostaddcomment)
- [/cms.Post/ModifyComment](#cmspostmodifycomment)
- [/cms.Post/DeleteComment](#cmspostdeletecomment)
- [/cms.Post/IncrCommentLike](#cmspostincrcommentlike)
- [/cms.Post/DescCommentLike](#cmspostdesccommentlike)
- [/cms.Post/IncrCommentUnlike](#cmspostincrcommentunlike)
- [/cms.Post/DescCommentUnlike](#cmspostdesccommentunlike)
## /cms.Post/Fetch
文章列表
### Request
```javascript
{
page: "0", // type<int64>, 页码,默认第一页
size: "0", // type<int64>, 单页显示数量,默认10,最多50
author_identity: "", // type<string>, 发布者唯一标识,可选
category_identity: "", // type<string>, 文章类型,可选
keyword: "", // type<string>, 根据文章名称模糊查找
type: 0, // type<int32>, 根据用户自定义文章类型过滤,可选,默认0,全部查找
}
```
### Reply
```javascript
{
data: [{
identity: "", // type<string>, 文章唯一标识
owner_id: "0", // type<int64>, 作者ID
owner_identity: "", // type<string>, 作者唯一标识
category_identity_array: [""], // list<string>, <必传>,所属分类Identity 列表
tags_identity_array: [""], // list<string>, 标签集Identity 列表
title: "", // type<string>, <必传>,标题
cover_path: "", // type<string>, 封面
author: "", // type<string>, 作者
author_identity: "", // type<string>
Cms: "", // type<string>, <必传>,内容
target_url: "", // type<string>, 跳转目标地址
source_url: "", // type<string>, 文章来源地址
hits: "0", // type<int64>, 点击量
accessory_identity_array: [""], // list<string>, 附件Identity 列表
has_accessory: false, // type<bool>, 是否有附件,默认没有
created_at: "", // type<string>, 创建时间
updated_at: "", // type<string>, 更新时间
description: "", // type<string>, 简介
like_hits: "0", // type<int64>, 点赞量
unlike_hits: "0", // type<int64>, 点踩量
comment_hits: "0", // type<int64>, 评论量
post_type: 0, // type<int32>, 用户自定义文章类型
rights: "", // type<string>, 权限
key: "", // type<string>, <必传>,文章key
category_data: [{
id: "0", // type<int64>
identity: "", // type<string>, 唯一标识
parent_id: "0", // type<int64>, 为空表示顶级分类
title: "", // type<string>, 标题
cover_path: "", // type<string>, 封面图片
intro: "", // type<string>, 简介
created_at: "", // type<string>, 创建时间
updated_at: "", // type<string>, 更新时间
child: [{}], // list<CategoryItem>, 子集
category_key: "", // type<string>, 分类标识
}], // list<CategoryItem>, 分类数据
tags_data: [{
id: "0", // type<int64>
identity: "", // type<string>, 唯一标识
title: "", // type<string>, 标题
cover_path: "", // type<string>, 封面图片
intro: "", // type<string>, 简介
created_at: "", // type<string>, 创建时间
}], // list<TagsItem>, 标签数据
accessory_data: [{
identity: "", // type<string>, 唯一标识
title: "", // type<string>, 附件标题
file_path: "", // type<string>, 附件文件路径
created_at: "", // type<string>, 创建时间
}], // list<AccessoryItem>, 附件数据
}], // list<PostItem>, 数据
count: "0", // type<int64>, 总数量
}
```
## /cms.Post/GetByIdentity
获取文章详情 By Identity
### Request
```javascript
{
identity: "", // type<string>, 必传唯一标识
author_identity: "", // type<string>, 必传作者唯一标识
}
```
### Reply
```javascript
{
identity: "", // type<string>, 文章唯一标识
owner_id: "0", // type<int64>, 作者ID
owner_identity: "", // type<string>, 作者唯一标识
category_identity_array: [""], // list<string>, <必传>,所属分类Identity 列表
tags_identity_array: [""], // list<string>, 标签集Identity 列表
title: "", // type<string>, <必传>,标题
cover_path: "", // type<string>, 封面
author: "", // type<string>, 作者
author_identity: "", // type<string>
Cms: "", // type<string>, <必传>,内容
target_url: "", // type<string>, 跳转目标地址
source_url: "", // type<string>, 文章来源地址
hits: "0", // type<int64>, 点击量
accessory_identity_array: [""], // list<string>, 附件Identity 列表
has_accessory: false, // type<bool>, 是否有附件,默认没有
created_at: "", // type<string>, 创建时间
updated_at: "", // type<string>, 更新时间
description: "", // type<string>, 简介
like_hits: "0", // type<int64>, 点赞量
unlike_hits: "0", // type<int64>, 点踩量
comment_hits: "0", // type<int64>, 评论量
post_type: 0, // type<int32>, 用户自定义文章类型
rights: "", // type<string>, 权限
key: "", // type<string>, <必传>,文章key
category_data: [{
id: "0", // type<int64>
identity: "", // type<string>, 唯一标识
parent_id: "0", // type<int64>, 为空表示顶级分类
title: "", // type<string>, 标题
cover_path: "", // type<string>, 封面图片
intro: "", // type<string>, 简介
created_at: "", // type<string>, 创建时间
updated_at: "", // type<string>, 更新时间
child: [{}], // list<CategoryItem>, 子集
category_key: "", // type<string>, 分类标识
}], // list<CategoryItem>, 分类数据
tags_data: [{
id: "0", // type<int64>
identity: "", // type<string>, 唯一标识
title: "", // type<string>, 标题
cover_path: "", // type<string>, 封面图片
intro: "", // type<string>, 简介
created_at: "", // type<string>, 创建时间
}], // list<TagsItem>, 标签数据
accessory_data: [{
identity: "", // type<string>, 唯一标识
title: "", // type<string>, 附件标题
file_path: "", // type<string>, 附件文件路径
created_at: "", // type<string>, 创建时间
}], // list<AccessoryItem>, 附件数据
}
```
## /cms.Post/GetByKey
获取文章详情 By Key
### Request
```javascript
{
key: "", // type<string>, <必传> 内容页的key
}
```
### Reply
```javascript
{
identity: "", // type<string>, 文章唯一标识
owner_id: "0", // type<int64>, 作者ID
owner_identity: "", // type<string>, 作者唯一标识
category_identity_array: [""], // list<string>, <必传>,所属分类Identity 列表
tags_identity_array: [""], // list<string>, 标签集Identity 列表
title: "", // type<string>, <必传>,标题
cover_path: "", // type<string>, 封面
author: "", // type<string>, 作者
author_identity: "", // type<string>
Cms: "", // type<string>, <必传>,内容
target_url: "", // type<string>, 跳转目标地址
source_url: "", // type<string>, 文章来源地址
hits: "0", // type<int64>, 点击量
accessory_identity_array: [""], // list<string>, 附件Identity 列表
has_accessory: false, // type<bool>, 是否有附件,默认没有
created_at: "", // type<string>, 创建时间
updated_at: "", // type<string>, 更新时间
description: "", // type<string>, 简介
like_hits: "0", // type<int64>, 点赞量
unlike_hits: "0", // type<int64>, 点踩量
comment_hits: "0", // type<int64>, 评论量
post_type: 0, // type<int32>, 用户自定义文章类型
rights: "", // type<string>, 权限
key: "", // type<string>, <必传>,文章key
category_data: [{
id: "0", // type<int64>
identity: "", // type<string>, 唯一标识
parent_id: "0", // type<int64>, 为空表示顶级分类
title: "", // type<string>, 标题
cover_path: "", // type<string>, 封面图片
intro: "", // type<string>, 简介
created_at: "", // type<string>, 创建时间
updated_at: "", // type<string>, 更新时间
child: [{}], // list<CategoryItem>, 子集
category_key: "", // type<string>, 分类标识
}], // list<CategoryItem>, 分类数据
tags_data: [{
id: "0", // type<int64>
identity: "", // type<string>, 唯一标识
title: "", // type<string>, 标题
cover_path: "", // type<string>, 封面图片
intro: "", // type<string>, 简介
created_at: "", // type<string>, 创建时间
}], // list<TagsItem>, 标签数据
accessory_data: [{
identity: "", // type<string>, 唯一标识
title: "", // type<string>, 附件标题
file_path: "", // type<string>, 附件文件路径
created_at: "", // type<string>, 创建时间
}], // list<AccessoryItem>, 附件数据
}
```
## /cms.Post/Search
搜索文章
### Request
```javascript
{
keyword: "", // type<string>, <必传>, 关键词
page_no: "0", // type<int64>, 页数
page_size: "0", // type<int64>, 每页记录数
}
```
### Reply
```javascript
{
data: [{
identity: "", // type<string>, 文章唯一标识
owner_id: "0", // type<int64>, 作者ID
owner_identity: "", // type<string>, 作者唯一标识
category_identity_array: [""], // list<string>, <必传>,所属分类Identity 列表
tags_identity_array: [""], // list<string>, 标签集Identity 列表
title: "", // type<string>, <必传>,标题
cover_path: "", // type<string>, 封面
author: "", // type<string>, 作者
author_identity: "", // type<string>
Cms: "", // type<string>, <必传>,内容
target_url: "", // type<string>, 跳转目标地址
source_url: "", // type<string>, 文章来源地址
hits: "0", // type<int64>, 点击量
accessory_identity_array: [""], // list<string>, 附件Identity 列表
has_accessory: false, // type<bool>, 是否有附件,默认没有
created_at: "", // type<string>, 创建时间
updated_at: "", // type<string>, 更新时间
description: "", // type<string>, 简介
like_hits: "0", // type<int64>, 点赞量
unlike_hits: "0", // type<int64>, 点踩量
comment_hits: "0", // type<int64>, 评论量
post_type: 0, // type<int32>, 用户自定义文章类型
rights: "", // type<string>, 权限
key: "", // type<string>, <必传>,文章key
category_data: [{
id: "0", // type<int64>
identity: "", // type<string>, 唯一标识
parent_id: "0", // type<int64>, 为空表示顶级分类
title: "", // type<string>, 标题
cover_path: "", // type<string>, 封面图片
intro: "", // type<string>, 简介
created_at: "", // type<string>, 创建时间
updated_at: "", // type<string>, 更新时间
child: [{}], // list<CategoryItem>, 子集
category_key: "", // type<string>, 分类标识
}], // list<CategoryItem>, 分类数据
tags_data: [{
id: "0", // type<int64>
identity: "", // type<string>, 唯一标识
title: "", // type<string>, 标题
cover_path: "", // type<string>, 封面图片
intro: "", // type<string>, 简介
created_at: "", // type<string>, 创建时间
}], // list<TagsItem>, 标签数据
accessory_data: [{
identity: "", // type<string>, 唯一标识
title: "", // type<string>, 附件标题
file_path: "", // type<string>, 附件文件路径
created_at: "", // type<string>, 创建时间
}], // list<AccessoryItem>, 附件数据
}], // list<PostItem>, 数据
count: "0", // type<int64>, 总数量
}
```
## /cms.Post/Create
发布文章
### Request
```javascript
{
identity: "", // type<string>, 文章唯一标识
owner_id: "0", // type<int64>, 作者ID
owner_identity: "", // type<string>, 作者唯一标识
category_identity_array: [""], // list<string>, <必传>,所属分类Identity 列表
tags_identity_array: [""], // list<string>, 标签集Identity 列表
title: "", // type<string>, <必传>,标题
cover_path: "", // type<string>, 封面
author: "", // type<string>, 作者
author_identity: "", // type<string>
Cms: "", // type<string>, <必传>,内容
target_url: "", // type<string>, 跳转目标地址
source_url: "", // type<string>, 文章来源地址
hits: "0", // type<int64>, 点击量
accessory_identity_array: [""], // list<string>, 附件Identity 列表
has_accessory: false, // type<bool>, 是否有附件,默认没有
created_at: "", // type<string>, 创建时间
updated_at: "", // type<string>, 更新时间
description: "", // type<string>, 简介
like_hits: "0", // type<int64>, 点赞量
unlike_hits: "0", // type<int64>, 点踩量
comment_hits: "0", // type<int64>, 评论量
post_type: 0, // type<int32>, 用户自定义文章类型
rights: "", // type<string>, 权限
key: "", // type<string>, <必传>,文章key
category_data: [{
id: "0", // type<int64>
identity: "", // type<string>, 唯一标识
parent_id: "0", // type<int64>, 为空表示顶级分类
title: "", // type<string>, 标题
cover_path: "", // type<string>, 封面图片
intro: "", // type<string>, 简介
created_at: "", // type<string>, 创建时间
updated_at: "", // type<string>, 更新时间
child: [{}], // list<CategoryItem>, 子集
category_key: "", // type<string>, 分类标识
}], // list<CategoryItem>, 分类数据
tags_data: [{
id: "0", // type<int64>
identity: "", // type<string>, 唯一标识
title: "", // type<string>, 标题
cover_path: "", // type<string>, 封面图片
intro: "", // type<string>, 简介
created_at: "", // type<string>, 创建时间
}], // list<TagsItem>, 标签数据
accessory_data: [{
identity: "", // type<string>, 唯一标识
title: "", // type<string>, 附件标题
file_path: "", // type<string>, 附件文件路径
created_at: "", // type<string>, 创建时间
}], // list<AccessoryItem>, 附件数据
}
```
### Reply
```javascript
{
code: 0, // type<int32>, 状态码
message: "", // type<string>, 状态说明
details: "", // type<string>, 数据
timeseq: "0", // type<int64>, 响应时间序列
}
```
## /cms.Post/Modify
修改文章
### Request
```javascript
{
identity: "", // type<string>, 文章唯一标识
owner_id: "0", // type<int64>, 作者ID
owner_identity: "", // type<string>, 作者唯一标识
category_identity_array: [""], // list<string>, <必传>,所属分类Identity 列表
tags_identity_array: [""], // list<string>, 标签集Identity 列表
title: "", // type<string>, <必传>,标题
cover_path: "", // type<string>, 封面
author: "", // type<string>, 作者
author_identity: "", // type<string>
Cms: "", // type<string>, <必传>,内容
target_url: "", // type<string>, 跳转目标地址
source_url: "", // type<string>, 文章来源地址
hits: "0", // type<int64>, 点击量
accessory_identity_array: [""], // list<string>, 附件Identity 列表
has_accessory: false, // type<bool>, 是否有附件,默认没有
created_at: "", // type<string>, 创建时间
updated_at: "", // type<string>, 更新时间
description: "", // type<string>, 简介
like_hits: "0", // type<int64>, 点赞量
unlike_hits: "0", // type<int64>, 点踩量
comment_hits: "0", // type<int64>, 评论量
post_type: 0, // type<int32>, 用户自定义文章类型
rights: "", // type<string>, 权限
key: "", // type<string>, <必传>,文章key
category_data: [{
id: "0", // type<int64>
identity: "", // type<string>, 唯一标识
parent_id: "0", // type<int64>, 为空表示顶级分类
title: "", // type<string>, 标题
cover_path: "", // type<string>, 封面图片
intro: "", // type<string>, 简介
created_at: "", // type<string>, 创建时间
updated_at: "", // type<string>, 更新时间
child: [{}], // list<CategoryItem>, 子集
category_key: "", // type<string>, 分类标识
}], // list<CategoryItem>, 分类数据
tags_data: [{
id: "0", // type<int64>
identity: "", // type<string>, 唯一标识
title: "", // type<string>, 标题
cover_path: "", // type<string>, 封面图片
intro: "", // type<string>, 简介
created_at: "", // type<string>, 创建时间
}], // list<TagsItem>, 标签数据
accessory_data: [{
identity: "", // type<string>, 唯一标识
title: "", // type<string>, 附件标题
file_path: "", // type<string>, 附件文件路径
created_at: "", // type<string>, 创建时间
}], // list<AccessoryItem>, 附件数据
}
```
### Reply
```javascript
{
code: 0, // type<int32>, 状态码
message: "", // type<string>, 状态说明
details: "", // type<string>, 数据
timeseq: "0", // type<int64>, 响应时间序列
}
```
## /cms.Post/Delete
删除文章
### Request
```javascript
{
id: "0", // type<int64>, 唯一ID
identity: "", // type<string>, 唯一标识
}
```
### Reply
```javascript
{
code: 0, // type<int32>, 状态码
message: "", // type<string>, 状态说明
details: "", // type<string>, 数据
timeseq: "0", // type<int64>, 响应时间序列
}
```
## /cms.Post/IncrPostLike
文章点赞处理
### Request
```javascript
{
post_identity: "", // type<string>, 必传 文章唯一标识
op_identity: "", // type<string>, 必传 操作者唯一标识
}
```
### Reply
```javascript
{
code: 0, // type<int32>, 状态码
message: "", // type<string>, 状态说明
details: "", // type<string>, 数据
timeseq: "0", // type<int64>, 响应时间序列
}
```
## /cms.Post/DescPostLike
文章点赞取消处理
### Request
```javascript
{
post_identity: "", // type<string>, 必传 文章唯一标识
op_identity: "", // type<string>, 必传 操作者唯一标识
}
```
### Reply
```javascript
{
code: 0, // type<int32>, 状态码
message: "", // type<string>, 状态说明
details: "", // type<string>, 数据
timeseq: "0", // type<int64>, 响应时间序列
}
```
## /cms.Post/IncrPostUnlike
文章点踩处理
### Request
```javascript
{
post_identity: "", // type<string>, 必传 文章唯一标识
op_identity: "", // type<string>, 必传 操作者唯一标识
}
```
### Reply
```javascript
{
code: 0, // type<int32>, 状态码
message: "", // type<string>, 状态说明
details: "", // type<string>, 数据
timeseq: "0", // type<int64>, 响应时间序列
}
```
## /cms.Post/DescPostUnlike
文章点踩取消处理
### Request
```javascript
{
post_identity: "", // type<string>, 必传 文章唯一标识
op_identity: "", // type<string>, 必传 操作者唯一标识
}
```
### Reply
```javascript
{
code: 0, // type<int32>, 状态码
message: "", // type<string>, 状态说明
details: "", // type<string>, 数据
timeseq: "0", // type<int64>, 响应时间序列
}
```
## /cms.Post/CommentList
评论列表
### Request
```javascript
{
post_identity: "", // type<string>, 必填 评论唯一标识
page: "0", // type<int64>, 页码,默认第一页
size: "0", // type<int64>, 单页显示数量,默认10,最多50
}
```
### Reply
```javascript
{
list: [{
identity: "", // type<string>, 评论唯一标识
post_identity: "", // type<string>, 文章唯一标识
parent_id: "0", // type<int64>, 为空表示顶级评论
Cms: "", // type<string>, 评论内容
reply_identity: "", // type<string>, 回复者唯一 标识
created_at: "", // type<string>, 创建时间
updated_at: "", // type<string>, 更新时间
list: [{}], // list<CommentItem>, 回复列表
like_hits: "0", // type<int64>, 点赞量
unlike_hits: "0", // type<int64>, 点踩量
comment_hits: "0", // type<int64>, 评论量
owner_name: "", // type<string>, 作者名称
owner_identity: "", // type<string>, 作者标识
role: "", // type<string>, 角色
}], // list<CommentItem>, 数据
count: "0", // type<int64>, 总数量
}
```
## /cms.Post/AddComment
发布评论
### Request
```javascript
{
identity: "", // type<string>, 评论唯一标识
post_identity: "", // type<string>, 文章唯一标识
parent_id: "0", // type<int64>, 为空表示顶级评论
Cms: "", // type<string>, 评论内容
reply_identity: "", // type<string>, 回复者唯一 标识
created_at: "", // type<string>, 创建时间
updated_at: "", // type<string>, 更新时间
list: [{}], // list<CommentItem>, 回复列表
like_hits: "0", // type<int64>, 点赞量
unlike_hits: "0", // type<int64>, 点踩量
comment_hits: "0", // type<int64>, 评论量
owner_name: "", // type<string>, 作者名称
owner_identity: "", // type<string>, 作者标识
role: "", // type<string>, 角色
}
```
### Reply
```javascript
{
code: 0, // type<int32>, 状态码
message: "", // type<string>, 状态说明
details: "", // type<string>, 数据
timeseq: "0", // type<int64>, 响应时间序列
}
```
## /cms.Post/ModifyComment
修改评论
### Request
```javascript
{
identity: "", // type<string>, 评论唯一标识
post_identity: "", // type<string>, 文章唯一标识
parent_id: "0", // type<int64>, 为空表示顶级评论
Cms: "", // type<string>, 评论内容
reply_identity: "", // type<string>, 回复者唯一 标识
created_at: "", // type<string>, 创建时间
updated_at: "", // type<string>, 更新时间
list: [{}], // list<CommentItem>, 回复列表
like_hits: "0", // type<int64>, 点赞量
unlike_hits: "0", // type<int64>, 点踩量
comment_hits: "0", // type<int64>, 评论量
owner_name: "", // type<string>, 作者名称
owner_identity: "", // type<string>, 作者标识
role: "", // type<string>, 角色
}
```
### Reply
```javascript
{
code: 0, // type<int32>, 状态码
message: "", // type<string>, 状态说明
details: "", // type<string>, 数据
timeseq: "0", // type<int64>, 响应时间序列
}
```
## /cms.Post/DeleteComment
删除评论
### Request
```javascript
{
identity: "", // type<string>, 需要删除的评论的唯一标识
post_identity: "", // type<string>, 文章唯一标识
}
```
### Reply
```javascript
{
code: 0, // type<int32>, 状态码
message: "", // type<string>, 状态说明
details: "", // type<string>, 数据
timeseq: "0", // type<int64>, 响应时间序列
}
```
## /cms.Post/IncrCommentLike
评论点赞处理
### Request
```javascript
{
comment_identity: "", // type<string>, 必填 评论唯一标识
op_identity: "", // type<string>, 必填 操作者唯一标识
}
```
### Reply
```javascript
{
code: 0, // type<int32>, 状态码
message: "", // type<string>, 状态说明
details: "", // type<string>, 数据
timeseq: "0", // type<int64>, 响应时间序列
}
```
## /cms.Post/DescCommentLike
评论点赞取消处理
### Request
```javascript
{
comment_identity: "", // type<string>, 必填 评论唯一标识
op_identity: "", // type<string>, 必填 操作者唯一标识
}
```
### Reply
```javascript
{
code: 0, // type<int32>, 状态码
message: "", // type<string>, 状态说明
details: "", // type<string>, 数据
timeseq: "0", // type<int64>, 响应时间序列
}
```
## /cms.Post/IncrCommentUnlike
评论点踩处理
### Request
```javascript
{
comment_identity: "", // type<string>, 必填 评论唯一标识
op_identity: "", // type<string>, 必填 操作者唯一标识
}
```
### Reply
```javascript
{
code: 0, // type<int32>, 状态码
message: "", // type<string>, 状态说明
details: "", // type<string>, 数据
timeseq: "0", // type<int64>, 响应时间序列
}
```
## /cms.Post/DescCommentUnlike
评论点踩取消处理
### Request
```javascript
{
comment_identity: "", // type<string>, 必填 评论唯一标识
op_identity: "", // type<string>, 必填 操作者唯一标识
}
```
### Reply
```javascript
{
code: 0, // type<int32>, 状态码
message: "", // type<string>, 状态说明
details: "", // type<string>, 数据
timeseq: "0", // type<int64>, 响应时间序列
}
```