GET selfie/hashtags/:hashtag/approved

(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
#REDIRECT [[GET selfie/hashtags/:hashtag/approved PT-BR]]
+
== Description ==
 +
 
 +
Returns a list of approved posts for a hashtag.
 +
 
 +
== Resource URL ==
 +
 
 +
  GET https://api.socialidnow.com/v1/marketing/selfie/hashtags/:hashtag/approved
 +
 
 +
== Parameters ==
 +
 
 +
=== URL Parameters ===
 +
 
 +
{|
 +
! align="left" width="200px"  | hashtag
 +
| width="200px" | required
 +
| hashtag identifier.
 +
|-
 +
! align="left" width="200px"  | client_id
 +
| width="200px" | required
 +
| Marketing Account identifier.
 +
|-
 +
! align="left" width="200px"  | order
 +
| width="200px" | optional
 +
| results order. Available values: created_at; like. Default: created_at.
 +
|-
 +
! align="left" width="200px"  | page_size
 +
| width="200px" | optional
 +
| maximum amount of results to be returned. Default: 15.
 +
|-
 +
! align="left" width="200px"  | page
 +
| width="200px" | optional
 +
| page number (each page contains page_size results). Default: 1.
 +
|-
 +
! align="left" width="200px"  | user_id
 +
| width="200px" | optional
 +
| user identifier for likes information.
 +
|}
 +
 
 +
== Authentication ==
 +
 
 +
This API does not require authentication.
 +
 
 +
== Response ==
 +
 
 +
=== Response Status ===
 +
 
 +
{|
 +
! align="left" width="200px" | ok (200)
 +
| The search was performed successfully.
 +
|-
 +
! align="left" width="200px" | bad_request (400)
 +
| Some required parameter was not informed.
 +
|-
 +
! align="left" width="200px" | not_found (404)
 +
| The hashtag was not found.
 +
|-
 +
! align="left" width="200px" | not_found (422)
 +
| Validation error in the search parameters.
 +
|-
 +
! align="left" width="200px" | internal_server_error (500)
 +
| An unknown error happened.
 +
|}
 +
 
 +
=== Response Body ===
 +
 
 +
A successful search returns the following fields:
 +
 
 +
{|
 +
! align="left" width="200px" | total
 +
| total amount of posts found.
 +
|-
 +
! align="left" width="200px" | count
 +
| amount of posts returned in the page (according to the specified page_size).
 +
|-
 +
! align="left" width="200px" | offset
 +
| amount of posts discarded (page start, according to the specified page).
 +
|-
 +
! align="left" width="200px" | results
 +
| array with post details.
 +
|}
 +
 
 +
== Examples ==
 +
 
 +
=== Request ===
 +
 
 +
Returns the third page with two approved posts for the hashtag "fashion', ordered by likes count, with likes information for the user identified by the IP "50.97.87.253".
 +
 
 +
  curl -iX GET 'https://api.socialidnow.com/v1/marketing/selfie/hashtags/fashion/approved?order=like&page=3&page_size=2&client_id=138&user_id=50.97.87.253'
 +
 
 +
=== Response ===
 +
 
 +
==== Response Headers ====
 +
 
 +
HTTP/1.1 200 Ok
 +
Status: 200
 +
 
 +
==== Response Body ====
 +
 
 +
  {
 +
    "total": 10,
 +
    "count": 2,
 +
    "offset": 4,
 +
    "results": [
 +
      {
 +
        "post_id": 123,
 +
        "provider": "instagram",
 +
        "picture_url": "http://photos-b.ak.instagram.com/hphotos-ak-xpf1/123.jpg",
 +
        "thumb_picture_url": "http://photos-b.ak.instagram.com/hphotos-ak-xpf1/123-thumb.jpg",
 +
        "low_picture_url": "http://photos-b.ak.instagram.com/hphotos-ak-xpf1/123-low.jpg",
 +
        "post_url": "http://instagram.com/p/123/",
 +
        "display_name": "thefashion",
 +
        "message": "I'm #fashion !",
 +
        "likes": 150,
 +
        "created_at": "2014-05-02T18:14:02Z",
 +
        "user_liked": true
 +
      },
 +
      { ... }
 +
    ]
 +
  }

Revision as of 18:30, 3 November 2014

Contents

Description

Returns a list of approved posts for a hashtag.

Resource URL

  GET https://api.socialidnow.com/v1/marketing/selfie/hashtags/:hashtag/approved

Parameters

URL Parameters

hashtag required hashtag identifier.
client_id required Marketing Account identifier.
order optional results order. Available values: created_at; like. Default: created_at.
page_size optional maximum amount of results to be returned. Default: 15.
page optional page number (each page contains page_size results). Default: 1.
user_id optional user identifier for likes information.

Authentication

This API does not require authentication.

Response

Response Status

ok (200) The search was performed successfully.
bad_request (400) Some required parameter was not informed.
not_found (404) The hashtag was not found.
not_found (422) Validation error in the search parameters.
internal_server_error (500) An unknown error happened.

Response Body

A successful search returns the following fields:

total total amount of posts found.
count amount of posts returned in the page (according to the specified page_size).
offset amount of posts discarded (page start, according to the specified page).
results array with post details.

Examples

Request

Returns the third page with two approved posts for the hashtag "fashion', ordered by likes count, with likes information for the user identified by the IP "50.97.87.253".

 curl -iX GET 'https://api.socialidnow.com/v1/marketing/selfie/hashtags/fashion/approved?order=like&page=3&page_size=2&client_id=138&user_id=50.97.87.253'

Response

Response Headers

HTTP/1.1 200 Ok
Status: 200

Response Body

 {
    "total": 10,
    "count": 2,
    "offset": 4,
    "results": [
      {
        "post_id": 123,
        "provider": "instagram",
        "picture_url": "http://photos-b.ak.instagram.com/hphotos-ak-xpf1/123.jpg",
        "thumb_picture_url": "http://photos-b.ak.instagram.com/hphotos-ak-xpf1/123-thumb.jpg",
        "low_picture_url": "http://photos-b.ak.instagram.com/hphotos-ak-xpf1/123-low.jpg",
        "post_url": "http://instagram.com/p/123/",
        "display_name": "thefashion",
        "message": "I'm #fashion !",
        "likes": 150,
        "created_at": "2014-05-02T18:14:02Z",
        "user_liked": true
      },
      { ... }
    ]
 }
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox