fresns
  1. 编辑器
fresns
  • 请求标头
  • 通用数据结构
  • 错误码
  • 全局配置
    • 全局配置信息
      GET
    • 状态码信息
      GET
    • 扩展档案配置
      GET
    • 上传用的令牌
      GET
    • 用户角色
      GET
    • 地图服务商
      GET
    • 内容类型
      GET
    • 表情图
      GET
    • 阻止词
      GET
  • 公共业务
    • 输入提示信息
    • 回调返参查询
    • 发送验证码
    • 上传日志
    • 上传文件
    • 文件下载链接
    • 下载过文件的用户
  • 账号
    • 注册
    • 登录
    • 重置密码
    • 获取账号详情
    • 钱包交易记录
    • 身份验证
    • 修改账号资料
    • 退出登录
    • 申请删除账号
    • 撤销删除申请
  • 用户
    • 获取用户列表
    • 获取用户详情
    • 获取用户认识的关注者
    • 获取用户互动的用户列表
    • 获取用户标记的内容列表
    • 用户登录
    • 用户面板
    • 修改用户资料
    • 操作标记
    • 标记备注
  • 消息
    • [通知]获取消息列表
    • [通知]更新阅读状态
    • [通知]删除消息
    • [对话]获取对话列表
    • [对话]获取对话详情
    • [对话]获取消息列表
    • [对话]置顶对话
    • [对话]更新阅读状态
    • [对话]发送消息
    • [对话]删除对话或对话的消息
  • 小组
    • 获取树结构小组列表
    • 获取小组分类
    • 获取小组列表
    • 获取小组详情
    • 获取小组互动的用户列表
  • 话题
    • 获取话题列表
    • 获取话题详情
    • 获取话题互动的用户列表
  • 帖子
    • 获取帖子列表
    • 获取关注对象的帖子列表
    • 获取位置附近的帖子列表
    • 获取帖子详情
    • 获取帖子互动的用户列表
    • 获取帖子的附属用户列表
    • 获取帖子的日志列表
    • 获取帖子日志详情
    • 删除帖子
  • 评论
    • 获取评论列表
    • 获取关注对象的评论列表
    • 获取位置附近的评论列表
    • 获取评论详情
    • 获取评论互动的用户列表
    • 获取评论的日志列表
    • 获取评论日志详情
    • 删除评论
  • 编辑器
    • 快速发表(帖子)
      POST
    • 快速发表(评论)
      POST
    • 编辑器配置信息
      GET
    • 获取草稿列表(帖子)
      GET
    • 获取草稿列表(评论)
      GET
    • 创建草稿(帖子)
      POST
    • 创建草稿(评论)
      POST
    • 生成编辑草稿(帖子)
      POST
    • 生成编辑草稿(评论)
      POST
    • 获取草稿详情(帖子)
      GET
    • 获取草稿详情(评论)
      GET
    • 更新草稿内容(帖子)
      PUT
    • 更新草稿内容(评论)
      PUT
    • 提交发表(或审核)
      POST
    • 撤回审核中草稿
      PATCH
    • 删除草稿
      DELETE
  • 搜索
    • 用户
    • 小组
    • 话题
    • 帖子
    • 评论
  1. 编辑器

更新草稿内容(帖子)

开发中
PUT
http://localhost:8080/api/v2/editor/post/{draftId}
参数留空表示不更新。
文件功能,使用文件上传接口上传文件,参数示例:
tableName = 帖子 post_logs 评论 comment_logs
tableColumn = id
tableId = 当前草稿 ID {draftId}
位置信息 map 参数示例:
查看 map id 信息
位置信息删除(清空)需使用 deleteMap 参数。

请求参数

Path 参数
draftId
string 
必需
Header 参数
X-Fresns-App-Id
string 
必需
密钥 App ID
密钥位置:控制面板->应用中心->应用密钥
默认值:
{{appId}}
X-Fresns-Client-Platform-Id
integer 
必需
平台编号,与密钥的「平台」匹配
默认值:
{{clientPlatformId}}
X-Fresns-Client-Version
string 
必需
你的客户端版本号,推荐使用语义化版本号
默认值:
{{clientVersion}}
X-Fresns-Client-Device-Info
string 
必需
交互设备信息 session_logs > device_info
压缩 Object 信息为字符串传参
默认值:
{{clientDeviceInfo}}
X-Fresns-Aid
string 
可选
账号参数(留空则视为未登录账号)
默认值:
{{aid}}
X-Fresns-Aid-Token
string 
可选
账号身份凭证(传参 aid 时必传)
默认值:
{{aidToken}}
X-Fresns-Uid
integer 
可选
用户参数(留空则视为未登录用户)
默认值:
{{uid}}
X-Fresns-Uid-Token
string 
可选
用户身份凭证(传参 uid 时必传)
默认值:
{{uidToken}}
X-Fresns-Signature
string 
签名
必需
X-Fresns-Signature-Timestamp
string 
必需
签名生成时间(当前 Unix 时间戳,精确到秒或毫秒都支持)
Body 参数application/json
editorUnikey
string 
必需
是否为编辑器插件
传参 Fresns 则重置为默认编辑器
postGid
string 
小组
必需
postTitle
string 
标题
必需
postIsComment
boolean 
是否可以评论帖子
必需
postIsCommentPublic
boolean 
必需
是否公开评论
不公开则仅帖子作者可见
postQuotePid
string 
必需
引用的帖子 PID
非必填
content
string 
正文内容
必需
isMarkdown
boolean 
必需
内容是否为 MD 格式
isAnonymous
boolean 
是否匿名
必需
map
object 
位置信息
必需
mapId
integer 
必需
latitude
number 
必需
longitude
number 
必需
scale
string 
可选
continent
string 
可选
continentCode
string 
可选
country
string 
可选
countryCode
string 
可选
region
string 
可选
regionCode
string 
可选
city
string 
可选
cityCode
string 
可选
district
string 
可选
address
string 
可选
zip
string 
可选
poi
string 
必需
poiId
string 
可选
extends
array [object {4}] 
扩展内容
必需
eid
string 
必需
canDelete
boolean 
必需
用户是否可以直接删除
rating
string 
排序
必需
pluginUnikey
string 
必需
archives
array [object {4}] 
必需
code
string 
必需
value
string 
必需
isPrivate
boolean 
必需
是否私有(是否对外公开展示)
pluginUnikey
string 
必需
deleteMap
boolean 
删除位置信息
必需
deleteFile
string 
必需
删除文件,传参 fid
deleteExtend
string 
必需
删除扩展内容,传参 eid
deleteArchive
string 
必需
删除扩展参数,传参 code
示例
{
    "editorUnikey": "string",
    "postGid": "string",
    "postTitle": "string",
    "postIsComment": true,
    "postIsCommentPublic": true,
    "postQuotePid": "string",
    "content": "string",
    "isMarkdown": true,
    "isAnonymous": true,
    "map": {
        "mapId": 0,
        "latitude": 0,
        "longitude": 0,
        "scale": "string",
        "continent": "string",
        "continentCode": "string",
        "country": "string",
        "countryCode": "string",
        "region": "string",
        "regionCode": "string",
        "city": "string",
        "cityCode": "string",
        "district": "string",
        "address": "string",
        "zip": "string",
        "poi": "string",
        "poiId": "string"
    },
    "extends": [
        {
            "eid": "string",
            "canDelete": true,
            "rating": "string",
            "pluginUnikey": "string"
        }
    ],
    "archives": [
        {
            "code": "string",
            "value": "string",
            "isPrivate": true,
            "pluginUnikey": "string"
        }
    ],
    "deleteMap": true,
    "deleteFile": "string",
    "deleteExtend": "string",
    "deleteArchive": "string"
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PUT 'http://localhost:8080/api/v2/editor/post/' \
--header 'X-Fresns-App-Id;' \
--header 'X-Fresns-Client-Platform-Id;' \
--header 'X-Fresns-Client-Version;' \
--header 'X-Fresns-Client-Device-Info;' \
--header 'X-Fresns-Aid: ' \
--header 'X-Fresns-Aid-Token: ' \
--header 'X-Fresns-Uid: ' \
--header 'X-Fresns-Uid-Token: ' \
--header 'X-Fresns-Signature;' \
--header 'X-Fresns-Signature-Timestamp;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "editorUnikey": "string",
    "postGid": "string",
    "postTitle": "string",
    "postIsComment": true,
    "postIsCommentPublic": true,
    "postQuotePid": "string",
    "content": "string",
    "isMarkdown": true,
    "isAnonymous": true,
    "map": {
        "mapId": 0,
        "latitude": 0,
        "longitude": 0,
        "scale": "string",
        "continent": "string",
        "continentCode": "string",
        "country": "string",
        "countryCode": "string",
        "region": "string",
        "regionCode": "string",
        "city": "string",
        "cityCode": "string",
        "district": "string",
        "address": "string",
        "zip": "string",
        "poi": "string",
        "poiId": "string"
    },
    "extends": [
        {
            "eid": "string",
            "canDelete": true,
            "rating": "string",
            "pluginUnikey": "string"
        }
    ],
    "archives": [
        {
            "code": "string",
            "value": "string",
            "isPrivate": true,
            "pluginUnikey": "string"
        }
    ],
    "deleteMap": true,
    "deleteFile": "string",
    "deleteExtend": "string",
    "deleteArchive": "string"
}'

返回响应

🟢200成功
application/json
Body
code
integer 
必需
message
string 
必需
data
null 
必需
示例
{
    "code": 0,
    "message": "ok",
    "data": null
}
上一页
获取草稿详情(评论)
下一页
更新草稿内容(评论)
Built with