Skip to content

Filter hashtags

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

Retrieve all public posts with one or multiple hashtags.

Endpoint

GET https://api.tapglue.com/0.4/posts?where={"post": { "tags": ["running","cardio"] }}

Example

curl https://api.tapglue.com/0.4/posts?where=%7B%22post%22:%20%7B%20%22tags%22:%20%5B%22running%22,%22cardio%22%5D%20%7D%7D" \
    -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": 3
  		},
      "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": "macy@mail.com",
      "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