- 必须先读
- Ajax编程_V7.6大纲配套
- 数据可视化
- Vue基础
- Vue_大事件
- 黑马头条号
- 极客园_PC
- 极客园(黑马头条)_移动端
- 人资项目
- 小兔鲜电商
- 小程序基础
- 小程序项目
- layui_大事件
- 品优购电商后台
- 其他可用接口
编辑-文章
PUT
/v1_0/mp/articles/{target}
请求参数
Path 参数
target
string
文章id
示例值:
91149583-ec52-4bc2-8cae-4e2e12934e6e
Query 参数
draft
string
可选
示例值:
false
Header 参数
Authorization
string
必需
示例值:
{{GK_ACCESS_TOKEN}}
Body 参数application/json
id
string
文章id
title
string
文章标题
channel_id
integer
文章频道id
content
string
文章内容
cover
object
文章封面对象
type
integer
文章封面类型
images
array[string]
文章封面数组
pub_date
string
文章发布时间
示例
{
"id": "91149583-ec52-4bc2-8cae-4e2e12934e6e",
"title": "修改后标题",
"channel_id": 6,
"content": "<p>我是文章内容123</p>",
"cover": {
"type": 1,
"images": [
"http://geek.itheima.net/uploads/1659338630976.jpg"
]
},
"pub_date": "2022-08-01 15:24:02"
}
示例代码
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://geek.itheima.net/v1_0/mp/articles/91149583-ec52-4bc2-8cae-4e2e12934e6e' \
--header 'Authorization: {{GK_ACCESS_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "91149583-ec52-4bc2-8cae-4e2e12934e6e",
"title": "修改后标题",
"channel_id": 6,
"content": "<p>我是文章内容123</p>",
"cover": {
"type": 1,
"images": [
"http://geek.itheima.net/uploads/1659338630976.jpg"
]
},
"pub_date": "2022-08-01 15:24:02"
}'
返回响应
🟢200成功
application/json
Body
data
object
响应数据
id
string
文章id
message
string
响应消息
示例
{
"data": {
"id": "91149583-ec52-4bc2-8cae-4e2e12934e6e"
},
"message": "OK"
}
修改于 2022-08-01 08:16:35