Skip to content

Retrieve user posts

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

Retrieve all posts of a single user.

Endpoint

GET https://api.tapglue.com/0.4/users/:UserID/posts

Example

curl https://api.tapglue.com/0.4/users/:UserID/posts \
    -u APP_TOKEN:SESSION_TOKEN \
    -H "User-Agent: Tapglue Test UA" \
    -H 'Accept: application/json'

Response

{
  "posts": [
    {
      "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
    },
    {
      "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": 1,
    		"likes": 2
  		},
      "created_at": "2015-12-21T16:45:11.838737109Z",
      "id": "16226741836058785",
      "is_liked": false,
      "tags": [
        "running",
        "cardio",
        "fitness"
      ],
      "updated_at": "2015-12-21T16:45:11.838737312Z",
      "user_id": "16226732054941357",
      "visibility": 30
    }
  ],
  "posts_count": 2,
  "users": {
    "16226732054941357": {
      "id_string": "16226732054941357",
      "id": 16226732054941356,
      "social_ids": {
        "facebook": "fb12345"
      },
      "user_name": "Macy",
      "first_name": "Neil",
      "last_name": "Hammond",
      "email": "[email protected]",
      "last_login": "2015-12-21T16:45:06.006316722Z",
      "metadata": {
        "key": "value"
      },
      "created_at": "2015-12-21T16:45:06.150596734Z",
      "updated_at": "2015-12-21T16:45:06.150596734Z",
      "enabled": true
    }
  },
  "users_count": 1
}
Clone this wiki locally