-
Notifications
You must be signed in to change notification settings - Fork 22
Create post
Onur Akpolat edited this page Nov 3, 2016
·
2 revisions
Create a post when a user want to write a custom story.
Endpoint
POST https://api.tapglue.com/0.4/posts
Params
Attribute | Type |
---|---|
visibility | int |
tags | [string] |
attachments | [object] |
Example
curl https://api.tapglue.com/0.4/posts \
-u APP_TOKEN:SESSION_TOKEN \
-H 'Accept: application/json' \
-H "User-Agent: Tapglue Test UA" \
-H "Content-Type: application/json" \
-d '{"visibility": 30, "tags": [ "running", "cardio", "fitness" ], "attachments": [ {"contents": {"en": "http://image.url/image.png"}, "name": "image", "type": "url"},{"contents": {"en": "I started running, its really great.", "name": "storyText ", "type": "text"} ] }'
Response
{
"attachments": [
{
"contents": {
"en": "http://image.url/image.png"
},
"name": "image",
"type": "url"
},
{
"contents": {
"en": "I started running, its really great."
},
"name": "storyText",
"type": "text"
}
],
"counts": {
"comments": 0,
"likes": 0
},
"created_at": "2015-12-21T16:45:12.77353746Z",
"id": "16226743413116589",
"is_liked": false,
"tags": [
"running",
"cardio",
"fitness"
],
"updated_at": "2015-12-21T16:45:12.773537681Z",
"user_id": "16226732054941357",
"visibility": 30
}