- 必须先读
- Ajax编程_V7.6大纲配套
- 数据可视化
- Vue基础
- Vue_大事件
- 黑马头条号
- 极客园_PC
- 极客园(黑马头条)_移动端
- 人资项目
- 小兔鲜电商
- 小程序基础
- 小程序项目
- layui_大事件
- 品优购电商后台
- 其他可用接口
更新-文章详情
PUT
/mp/v1_0/articles/{id}
请求参数
Path 参数
id
string
文章id
示例值:
1553118539336908800
Query 参数
draft
string
可选
示例值:
false
Header 参数
Authorization
string
必需
示例值:
{{HM_ACCESS_TOKEN}}
Body 参数application/json
id
string
文章id
title
string
文章标题
cover
object
文章封面对象
type
integer
文章封面类型
images
array[string]
文章封面图片数组
channel_id
integer
文章频道id
content
string
文章内容
示例
{
"id": "1553118539336908800",
"title": "fsdfs文章标题啊",
"cover": {
"type": 1,
"images": [
"http://toutiao-img.itheima.net/FrIKSxY5YWFfkvZF_X7RM4q_lMWi"
]
},
"channel_id": 7,
"content": "<p>文章内容啊</p>"
}
示例代码
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://api-toutiao-web.itheima.net/mp/v1_0/articles/1553118539336908800' \
--header 'Authorization: {{HM_ACCESS_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": "1553118539336908800",
"title": "fsdfs文章标题啊",
"cover": {
"type": 1,
"images": [
"http://toutiao-img.itheima.net/FrIKSxY5YWFfkvZF_X7RM4q_lMWi"
]
},
"channel_id": 7,
"content": "<p>文章内容啊</p>"
}'
返回响应
🟢201成功
application/json
Body
id
string
文章id
title
string
文章标题
cover
object
文章封面对象
type
integer
文章封面类型
images
array[string]
文章图片地址
channel_id
integer
文章频道id
content
string
文章内容
示例
{
"id": "1553118539336908800",
"title": "fsdfs文章标题啊",
"cover": {
"type": 1,
"images": [
"http://toutiao-img.itheima.net/FrIKSxY5YWFfkvZF_X7RM4q_lMWi"
]
},
"channel_id": 7,
"content": "<p>文章内容啊</p>"
}
修改于 2022-07-30 06:45:26