Skip to content

Get recent streams

Rafael Chacon edited this page Feb 22, 2012 · 1 revision

Return the latest streams for specified user (in a paginated way).

###URL: GET http://public-api.piictu.com/v2/users/<user_id>/streams

###HTTP method(s): GET

###Requires authentication ([[Authentication and Authorization]):

Yes

###Parameters (photos pagination):

  • page (optional:integer): Specifies the page of results of to retrieve, default = 1.
  • rpp (optional:integer): results per page, default =10, max = 50.
  • since_seq (optional:integer): Returns results with an SEQ greater than (that is, more recent than) the specified SEQ.
  • max_seq (optional:integer): Returns results with an SEQ less than (that is, older than) or equal to the specified SEQ.

###Usage example: Example using cURL:

curl -i "http://public-api.piictu.com/v2/users/4d70f5e75a0d0312b6000005/streams \
-F page=2" \
-X GET \
-H "Authorization: OAuth 2540af0de12cb2367691516b8477b0b7bd66dbd8ab6840b147340c6898c4eebd"

###Response:

On success

  • HTTP response code is 200 (ok)
  • HTTP response body is a JSON string like this:
{
  "current_page": 2,
  "results_per_page": 10,
  "total_entries": 14,
  "total_pages": 2,
  "previous_page": "?page=1&rpp=10",
  "streams": [
    {
      "stream": {...
      "created_at": "2011-05-31T01:41:09Z",
      "featured": false,
      "photos_count": 2,
      "popular": false,
      "seq": 13068454683940776,
      "staff_favorite": false,
      "title": "Art ? ",
      "trending": false,
      "updated_at": "2011-09-22T03:07:59Z",
      "users_count": 2,
      "id": "4de447358ef7810001000009",
      "original_photo": {
      "photo": {
      "caption": "Art ? "
      }
      },
      "from": {
      "avatar_url": "http://cdn-staging.piictu.com/avatars%2F4d7e40178362427891000001%2F90x90_1328643405",
      "bio": "Piictu - Lord of API",
      "fullname": "Edgar Gonzalez",
      "username": "edgar",
      "id": "4d7e40178362427891000001"
      },
      "photos": [
        {
          "photo": {
            "created_at": "2011-05-31T12:37:48Z",
            "seq": 13068454682136814,
            "url": "http://piictu.s3.amazonaws.com/photos%2F4de4e1191dcaa10001000008%2Foriginal",
            "id": "4de4e1191dcaa10001000008",
            "stream_id": "4de447358ef7810001000009",
            "thumbnail": "http://piictu.s3.amazonaws.com/photos/4de4e1191dcaa10001000008/90x90",
            "stream_title": "Art ? ",
            "from": {
              "avatar_url": "http://piictu.s3.amazonaws.com/avatars/4dca811e0834440001000003/90x90_1318638300",
              "bio": "www.thelulab.com ",
              "fullname": "Lu",
              "username": "lucia",
              "id": "4dca811e0834440001000003"
            },
            "type": 0,
            "total_likes": 0
            }
          },
          {
          "photo": {
            "caption": "Art ? ",
            "created_at": "2011-05-31T01:41:09Z",
            "seq": 13068060697203134,
            "url": "http://piictu.s3.amazonaws.com/photos%2F4de4472f8ef7810001000008%2Foriginal",
            "id": "4de4472f8ef7810001000008",
            "stream_id": "4de447358ef7810001000009",
            "thumbnail": "http://piictu.s3.amazonaws.com/photos/4de4472f8ef7810001000008/90x90",
            "stream_title": "Art ? ",
            "from": {
              "avatar_url": "http://cdn-staging.piictu.com/avatars%2F4d7e40178362427891000001%2F90x90_1328643405",
              "bio": "Piictu - Lord of API",
              "fullname": "Edgar Gonzalez",
              "username": "edgar",
              "id": "4d7e40178362427891000001"
            },
            "type": 1,
            "total_likes": 2
            }
          }
      ],
      "current_page": 1,
      "results_per_page": 10,
      "total_entries": 2,
      "total_pages": 1
      }
    }
  ]
}

Clone this wiki locally