Skip to content

Update post

Onur Akpolat edited this page Nov 3, 2016 · 1 revision

Update a single post.

Endpoint

PUT https://api.tapglue.com/0.4/posts/:PostID

Params

Attribute Type
visibility int
tags [string]
attachments [object]

Example

curl https://api.tapglue.com/0.4/posts \
    -X PUT \
    -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": 3,
    "likes": 10
  },
  "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
}
Clone this wiki locally