admin管理员组文章数量:1130349
Good afternoon everyone.
I have a website made with wordpress version 5.02. I want to use Rest Api functionality for developing native android application. At this address https://my-site/wp-json I receive a response with all endpoints available in Worpress Rest API.
I am interesting in getting post content by this url. https://my-site/wp-json/wp/v2/posts/4982 By this url I receive post info. By key "content", "rendered" I can get the post page in html format.
{
"id": 4982,
"date": "2018-03-18T17:26:46",
"date_gmt": "2018-03-18T14:26:46",
"modified": "2018-03-18T17:26:46",
"modified_gmt": "2018-03-18T14:26:46",
"slug": "relefnoe-telo",
"status": "publish",
"type": "post",
"content": {
"rendered": " html page here",
"protected": false
}}
I want to put the post info to my appication natively. Could you tell me please can I get post content in json format like this:
{
content: {
"title": "article title",
"image": "",
"gallery": [
{
"url": ""
},
{
"url": ""
}
],
"descr": "description"
}
}
Good afternoon everyone.
I have a website made with wordpress version 5.02. I want to use Rest Api functionality for developing native android application. At this address https://my-site/wp-json I receive a response with all endpoints available in Worpress Rest API.
I am interesting in getting post content by this url. https://my-site/wp-json/wp/v2/posts/4982 By this url I receive post info. By key "content", "rendered" I can get the post page in html format.
{
"id": 4982,
"date": "2018-03-18T17:26:46",
"date_gmt": "2018-03-18T14:26:46",
"modified": "2018-03-18T17:26:46",
"modified_gmt": "2018-03-18T14:26:46",
"slug": "relefnoe-telo",
"status": "publish",
"type": "post",
"content": {
"rendered": " html page here",
"protected": false
}}
I want to put the post info to my appication natively. Could you tell me please can I get post content in json format like this:
{
content: {
"title": "article title",
"image": "",
"gallery": [
{
"url": ""
},
{
"url": ""
}
],
"descr": "description"
}
}
本文标签: Rest API Post content
版权声明:本文标题:Rest API. Post content 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749069107a2311292.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论