Skip to content

V2 get timeline

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

Return the new timeline for the current user.

The new timeline is the photos from the user's friends

These photos are sorted by created date. Recent first

###URL: GET http://public-api.piictu.com/v2/timeline

###HTTP method(s): GET

###Requires authentication (OAuth 2.0 Authorization): true

###Parameters:

  • page (optional:integer): Specifies the page of results 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/timeline \
 -F page=2 \
 -F rpp=5 \
 -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":1,
  "results_per_page":10,
  "total_entries":1,
  "total_pages":1,
    "photos":[
      {
        "photo":{
          "caption":"first-photo",
          "created_at":"2011-03-14T09:23:17-07:00",
          "seq":38,
          "stream_id":"4d7e40f48362427891000002",
          "id":"4d7e40f58362427891000003",
          "thumbnail":"http://piictu-test.s3.amazonaws.com/photos/thumb_4d7e40f58362427891000003.jpeg",
          "url":"http://piictu-test.s3.amazonaws.com/photos/4d7e40f58362427891000003.jpeg"
        }
      },
      ...
    ],
}

Clone this wiki locally