unsplash v1.1.0 Unsplash.Users View Source
API endpoints for current-user and users
Link to this section Summary
Functions
GET /users/:username/collections
GET /users/:username
GET /users/:username/likes
GET /me
GET /users/:username/photos
GET /users/:username/portfolio
GET /users/:username/statistics
PUT /me
Link to this section Functions
Link to this function
collections(username, opts \\ []) View Source
GET /users/:username/collections
Args:
username- The user’s username. Required
Link to this function
get(username) View Source
GET /users/:username
The image URLs returned for the user’s profile image are instances of dynamically resizable image URLs.
Args:
username- the username string
Link to this function
likes(username, opts \\ []) View Source
GET /users/:username/likes
Args:
usernamethe username stringoptskeyword list of optional params
Options:
order_byHow to sort the photos. Optional. (Valid values: latest, oldest, popular; default: latest)
GET /me
Requires read_user scope
Link to this function
photos(username, opts \\ []) View Source
GET /users/:username/photos
Args:
usernameThe user’s username. Required.optskeyword list of optional params
Options:
pagePage number to retrieve. (Optional; default: 1)per_pageNumber of items per page. (Optional; default: 10)order_byHow to sort the photos. Optional. (Valid values: latest, oldest, popular; default: latest)statshow the stats for each user’s photo. (Optional; default: false)resolutionThe frequency of the stats. (Optional; default: “days”)quantityThe amount of for each stat. (Optional; default: 30)
Link to this function
portfolio(username) View Source
GET /users/:username/portfolio
Retrieve a single user’s portfolio link.
Args:
username- The user’s username. Required.
Link to this function
statistics(username, opts \\ []) View Source
GET /users/:username/statistics
Args:
username-The user’s username. Required.optskeyword list of optional params
Options:
resolution-The frequency of the stats. (Optional; default: “days”)quantity-The amount of for each stat. (Optional; default: 30)
Link to this function
update_me(opts \\ []) View Source
PUT /me
Args:
optskeyword list of optional params
Options:
username- Username.first_name- First name.last_name- Last name.email- Email.url- Portfolio/personal URL.location- Location.bio- About/bio.instagram_username- Instagram username.
Requires write_user scope