Skip to content
eyeem edited this page Feb 8, 2012 · 1 revision

Endpoint: Photos

These are the API calls that you can use to retrieve photos, comments and likes. Note that all requests require authorization, either by including the access_token in the header, or the client_id as a URL query parameter (see home)

Available endpoints

  • /photos, GET
  • /photos/#{id}, GET
  • /photos/#{id}/likers, GET
  • /photos/#{id}/likers/#{user_id}, GET
  • /photos/#{id}/comments, GET
  • /photos/#{id}/comments/#{comment_id}, GET

Representation

The various possible representations of a photo (simple,detailed) are presented and described in the model page.

API Calls

GET /photos

Retrieves the authenticated user's latest twenty photos TODO: Searching for photos will be available through this endpoint soon

Parameters

  • limit: (optional, default 20)
  • offset: (optional, default 0)
  • includeComments: (optional, default 0) boolean, default is false. If true, returns the latest two comments of a photo inline
  • includeLikers: (optional, default 0) boolean, default is false. If true, returns the latest two likers of a photo

Response

  • 200 and an array of photos.

Examples

https://www.eyeem.com/api/v2/photos?offset=0&limit=20&includeComments=1


GET /photos/#{id}

Retrieves a photo by id

Parameters

  • id: The id of the photo we want to retrieve information about.
  • includeComments: (optional, default 0) If true, returns the latest two comments of a photo inline
  • includeLikers: (optional, default 0) If true, returns the latest two likers of a photo
  • numComments: (optional, default 2) the number of comments to include in the response
  • numLikers: (optional, default 2) the number of likers to include in the response
  • includeAlbums: (optional, default 0) If true, includes the albums this photo is part of

Response

  • 200 and an a photo dictionary

Examples

https://www.eyeem.com/api/v2/photos/1234?detailed=1&includeAlbums=1&includeComments=1&numComment=5

GET /photos/#{id}/likers

Retrieves an array of the users who like the photo

Parameters

  • limit: (optional, default 20)
  • offset: (optional, default 0)

Response

  • 200 and and a dictionary containing limit, offset, total and an array of likers (users)

Examples

https://www.eyeem.com/api/v2/photos/1234/likers?offset=0&limit=5

GET /photos/#{id}/likers/#{user_id}

Checks whether a user likes a photo

Response

  • 200 if the user likes a photo, 404 otherwise

Examples

https://www.eyeem.com/api/v2/photos/1234/likers/1013

GET /photos/#{id}/comments

Retrieves an array of a photo's comments

Parameters

  • limit: (optional, default 20)
  • offset: (optional, default 0)

Response

  • 200 and and a dictionary containing limit, offset, total and an array of likers (users)

Examples

https://www.eyeem.com/api/v2/photos/1234/comments?offset=0&limit=5


GET /photos/#{id}/comments/#{comment_id}

Retrieves a specific comment on a photo

Response

  • 200 and the comment object

Examples

https://www.eyeem.com/api/v2/photos/1234/comments/11353