diff --git a/README.md b/README.md index 8721888..b15f756 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ The API is [REST API](http://en.wikipedia.org/wiki/Representational_State_Transf - **[GET users/show](https://github.com/500px/api-documentation/blob/master/endpoints/user/GET_users_show.md)** - **[GET users/:id/friends](https://github.com/500px/api-documentation/blob/master/endpoints/user/GET_users_id_friends.md)** - **[GET users/:id/followers](https://github.com/500px/api-documentation/blob/master/endpoints/user/GET_users_id_followers.md)** +- **[GET users/search](https://github.com/500px/api-documentation/blob/master/endpoints/user/GET_users_search.md)** - **[POST users/:id/friends](https://github.com/500px/api-documentation/blob/master/endpoints/user/POST_users_id_friends.md)** - **[DELETE users/:id/friends](https://github.com/500px/api-documentation/blob/master/endpoints/user/DELETE_users_id_friends.md)** diff --git a/endpoints/photo/GET_photos_search.md b/endpoints/photo/GET_photos_search.md index 9905074..0614bc1 100644 --- a/endpoints/photo/GET_photos_search.md +++ b/endpoints/photo/GET_photos_search.md @@ -34,7 +34,6 @@ An array with the following keys and values: *** ## Errors - - **400 Bad Request** — The request issued is missing one or more of the required parameters or contains parameters in an invalid form. @@ -43,7 +42,7 @@ An array with the following keys and values: ## Example **Request** - v1/photos/search?term=bike + GET v1/photos/search?term=bike ## Return __shortened for example purpose__ ``` json diff --git a/endpoints/user/GET_users_search.md b/endpoints/user/GET_users_search.md new file mode 100644 index 0000000..29ade34 --- /dev/null +++ b/endpoints/user/GET_users_search.md @@ -0,0 +1,96 @@ +# User Resources + + GET users/search + +## Description +Return listing of ten (up to one hundred) users from search results for a specified search term. + +*** + +## Requires authentication +* A valid Consumer Key must be provided in **consumer_key** parameter. +* Alternatively, a valid **[OAuth][]** request with an authorized Access Token will be accepted. + +*** + +## Parameters +- **term** _(required)_ — A keyword to search for. + +*** + +## Return format +An array with the following keys and values: + +- **current_page** — Number of the page that is returned. +- **total_pages** — Total number of pages in this feature's stream. +- **total_items** — Total number of items in this feature's stream. +- **users** — An array of Users objects in **[full format][]**. **. + +*** + +## Errors +- **400 Bad Request** — The request issued is missing one or more of the required parameters or contains parameters in an invalid form. + +*** + +## Example +**Request** + + GET v1/photos/search?term=vovko + +**Return** +``` json +{ + "current_page": 1, + "total_pages": 1, + "total_items": 1, + "users": [ + { + "id": 173, + "username": "vovko", + "firstname": "Vladimir", + "lastname": "Drizhepolov", + "birthday": null, + "sex": 1, + "city": "Toronto", + "state": "Ontario", + "country": "Canada", + "registration_date": "2009-11-08T12:41:14-05:00", + "about": "Toronto based photographer.\r\n", + "domain": "vovko.500px.com", + "fotomoto_on": true, + "locale": "en", + "show_nude": true, + "fullname": "Vladimir Drizhepolov", + "userpic_url": "http://acdn.500px.net/173.jpg", + "upgrade_status": 2, + "store_on": true, + "contacts": { + "website": "vovko.ca", + "twitter": "vovko", + "flickr": "Vladimir Drizhepolov", + "gtalk": "vladimir@drizhepolov.com", + "facebook": "562874260", + "blog": "www.vovko.ca" + }, + "equipment": { + "camera": [ + "Kiev 88" + ], + "lens": [ + "Volna 80mm" + ] + }, + "photos_count": 17, + "affection": 4, + "in_favorites_count": 1, + "friends_count": 86, + "followers_count": 18, + "following": false + } + ] +} +``` + +[OAuth]: https://github.com/500px/api-documentation/tree/master/authentication +[full format]: https://github.com/500px/api-documentation/blob/master/basics/formats_and_terms.md#full-format \ No newline at end of file