Pattern | description | ex. response |
---|
Code Block |
---|
| GET {{url}}/restful_api/mobile/post?access_token={{token}} |
| Get List of Posts | {
Code Block |
---|
| {
"status": "success", |
[ {
[
{
"resource_name": "post", |
"title": "Title of the post", |
"description": "Description of the post", |
{
0 },
{
{
"full_name": "Cute User", |
1 }, [ {
} ],
"creation_date": "2018-11-30T04:44:39+00:00", |
"modification_date": null, |
"link": "http://localhost:7788/post/1/love/", |
{
"can_sponsor_in_feed": false, |
true },
null } ] }GET url |
Code Block |
---|
| GET {{url}}/restful_api/mobile/post/1?access_token={{token}} |
| Get Post Detail | Expand source {
Code Block |
---|
| {
"status": "success", |
{
{
"resource_name": "post", |
"title": "Title of the post", |
"description": "Description of the post", |
{
0 },
{
{
"full_name": "Cute User", |
1 }, [ {
} ],
"creation_date": "2018-11-30T04:44:39+00:00", |
"modification_date": null, |
"link": "http://localhost:7788/post/1/love/", |
{
"can_sponsor_in_feed": false, |
true },
{ {
{
"ref": "mobile/like?item_type=post&item_id=1" |
}, {
{
"ref": "mobile/comment?item_type=post&item_id=1" |
} }, {
"comment_type_id": "post", |
"feed_link": "http://localhost:7788/post/1/love/", |
}} } | GET url
|
Code Block |
---|
| GET {{url}}/restful_api/mobile/post/form/?access_token={{token |
|
Or get Edit form response
GET url
}}
# Or get Edit form response
GET {{url}}/restful_api/mobile/post/form/1?access_token={{token}} |
| Get create post form | {
Code Block |
---|
| {
"status": "success", |
|
| {
{
"title": "Add a new post", |
|
|
|
|
| {
| {
|
| {
| {
|
"component_name": "Text", |
|
| true,
|
|
|
"placeholder": "Fill title for post" |
|
},
| {
|
"component_name": "TextArea", |
|
| true,
|
"returnKeyType": "default", |
|
|
"placeholder": "Add content to post" |
|
},
| {
|
"component_name": "Attachment", |
|
|
|
| null,
null,
"current_attachments": |
| null,
null,
"upload_endpoint": "mobile/attachment" |
|
}
}
},
}
}
},
"additional_info": |
| {
{
"label": "Additional Info", |
|
| {
| {
|
"component_name": "Choice", |
|
| true,
|
|
|
| [
{
| 1,
|
},
{
| 2,
|
},
{
| 3,
3,
"label": "Entertainment" |
|
}
],
|
},
| {
|
"component_name": "Tags", |
|
|
|
|
"description": "Separate multiple topics with commas." |
|
},
| {
|
"component_name": "File", |
|
|
|
|
| null,
null,
"upload_endpoint": "mobile/file" |
|
}
}
},
| {
|
| {
| {
|
"component_name": "Privacy", |
|
| 0,
0,
"returnKeyType": "next", |
|
| [
{
|
"value": 0
},
{
"label": "Friends",
"value": 1
},
{
"label": "Friends of Friends",
"value": 2
},
{
"label": "Only Me",
"value": 3
},
{
"label": "Custom",
"value": 4
}
],
"label": "Privacy",
"multiple": false,
"description": "Control who can see this post"
}
}
}
},
"fields": {
"module_id": {
"name": "module_id",
"component_name": "Hidden",
"value": "post"
},
"item_id": {
"name": "item_id",
"component_name": "Hidden"
},
"draft": {
"name": "draft",
"component_name": "Checkbox",
"value": 0,
"label": "Save as Draft"
},
"submit": {
"name": "submit",
"component_name": "Submit",
"label": "Publish",
"value": 1
}
}
}
}DELETE url
"value": 0
},
{
"label": "Friends",
"value": 1
},
{
"label": "Friends of Friends",
"value": 2
},
{
"label": "Only Me",
"value": 3
},
{
"label": "Custom",
"value": 4
}
],
"label": "Privacy",
"multiple": false,
"description": "Control who can see this post"
}
}
}
},
"fields": {
"module_id": {
"name": "module_id",
"component_name": "Hidden",
"value": "post"
},
"item_id": {
"name": "item_id",
"component_name": "Hidden"
},
"draft": {
"name": "draft",
"component_name": "Checkbox",
"value": 0,
"label": "Save as Draft"
},
"submit": {
"name": "submit",
"component_name": "Submit",
"label": "Publish",
"value": 1
}
}
}
} |
|
Code Block |
---|
| DELETE {{url}}/restful_api/mobile/post/{{post_id}}?access_token={{token}} |
| Delete a Post | |