Skip to content
ramz edited this page Mar 23, 2012 · 2 revisions

Endpoint: Users

These are the API calls that you can use to retrieve users, their photos, friends and other data

Available endpoints

  • /users, GET
  • /users/#{id}, GET
  • /users/#{id}/photos, GET
  • /users/#{id}/likedPhotos, GET
  • /users/#{id}/friendsPhotos, GET
  • /users/#{id}/likedAlbums, GET
  • /users/#{id}/feed, GET
  • /users/#{id}/friends, GET
  • /users/#{id}/friends/#{friend_id}, GET
  • /users/#{id}/followers, GET
  • /users/#{id}/followers/#{friend_id}, GET
  • /users/#{id}/topics, GET
  • /users/#{id}/socialMedia, GET

Representation

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

API Calls

GET /users

Search for users

Parameters

  • q: the string to search users by
  • limit (num of search results to return, default 30)
  • offset (offset of search results to start at, default 0)

Response

  • 200, pagination params and a array of user objects

Examples

https://www.eyeem.com/api/v2/users?q=ramzi&limit=25&offset=20


GET /users/#{id}

Get a user's profile information

Parameters

  • detailed (boolean, default 0) 1 returns more details about the user

Response

  • 200 and a user object

Examples

https://www.eyeem.com/api/v2/users/1013

GET /users/#{id}/photos

Get the given user's photos

Parameters

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

Response

  • 200 and and a dictionary containing limit, offset, total and an array of photo objects

Examples

https://www.eyeem.com/api/v2/users/1013/photos

GET /users/#{id}/likedPhotos

Get all the photos that a user has liked note: sending onlyId=1 in request url returns a json array userIds containing just the ids

Parameters

  • limit: (optional, default 20)
  • offset: (optional, default 0)
  • onlyId=1 (optional)

Response

  • 200 and and a dictionary containing limit, offset, total and an array of photo objects

Examples

https://www.eyeem.com/api/v2/users/1013/likedPhotos

GET /users/#{id}/friendsPhotos

Get all the photos by users that the given user follows (ordered chronologically)

Parameters

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

Response

  • 200 and and a dictionary containing limit, offset, total and an array of photo objects

Examples

https://www.eyeem.com/api/v2/users/1013/friendsPhotos

GET /users/#{id}/likedAlbums

note: sending onlyId=1 in request url returns a json array likedAlbumIds containing just the ids

Parameters

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

Response

  • 200 and and a dictionary containing limit, offset, total and an array of likedAlbums (albums objects)

Examples

https://www.eyeem.com/api/v2/users/1013/likedAlbums?offset=0&limit=10

GET /users/#{id}/feed

Gets albums relevant to a user (selection happens server side, includes albums they like, albums they contributed to, trending, recommended and nearby albums)

If requested from a user other than the authenticated one, only the user's liked albums are returned

Parameters

  • limit: (optional, default 20)
  • offset: (optional, default 0)
  • TODO: more parameters to come

Response

  • 200 and and a dictionary containing limit, offset, total and an array of albums

Examples

https://www.eyeem.com/api/v2/users/1013/feed

GET /users/#{id}/friends

Get a user's friends (users that they follow) note: sending onlyId=1 in request url returns a json array userIds containing just the ids

Parameters

  • limit: (optional, default 20)
  • offset: (optional, default 0)
  • onlyId=1 (optional)

Response

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

Examples

https://www.eyeem.com/api/v2/users/1013/friends

GET /users/#{id}/friends/#{friend_id}

Check if the given user is friends with (follows) another user

Parameters

Response

  • 200 if friends, 404 if not

Examples

https://www.eyeem.com/api/v2/users/1013/friends/1014

GET /users/#{id}/followers

Get a user's followers note: sending onlyId=1 in request url returns a json array userIds containing just the ids

Parameters

  • limit: (optional, default 20)
  • offset: (optional, default 0)
  • onlyId=1 (optional)

Response

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

Examples

https://www.eyeem.com/api/v2/users/1013/followers

GET /users/#{id}/followers/#{friend_id}

Check if a user follows the given user

Parameters

Response

  • 200 if following, 404 if not

Examples

https://www.eyeem.com/api/v2/users/1013/followers/1014

GET /users/#{id}/topics

Get a list of topics the user has contributed to (the topics correlate to tag albums)

Parameters

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

Response

  • 200 and and a dictionary containing limit, offset, total and an array of topic objects

Examples

https://www.eyeem.com/api/v2/users/#{id}/topics

GET /users/#{id}/socialMedia

Only available for the authenticated user, this call returns the status of the various connected social media accounts

Parameters

  • none

Response

  • 200 and an array of services objects

Examples

https://www.eyeem.com/api/v2/users/1013/socialMedia

Clone this wiki locally