This is an Express REST API service using UNSPLASH API
- Clone this repository
$ git clone https://github.com/hseoy/unsplash-api
- Get the API key from here. Then modify the .env.dev
API_ACCESS_KEY=YOUR_API_ACCESS_KEY
- Install dependencies
$ yarn install
- Start the server
$ yarn start:dev
Return:
"unsplash api"
Search photos using the Unsplash API
Queries :
query | description | is required |
---|---|---|
query |
Search terms. | yes |
page |
Page number to retrieve. (Optional; default: 1) | no |
perPage |
Number of items per page. (Optional; default: 10) | no |
Return:
[
// You can check the response here: https://unsplash.com/documentation#search-photos
]
Get random photos using the Unsplash API
Queries :
query | description | is required |
---|---|---|
query |
Limit selection to photos matching a search term. | yes |
count |
The number of photos to return. (Default: 1; max: 30) | no |
Return:
[
// You can check the response here: https://unsplash.com/documentation#get-a-random-photo
]