1.4 KiB
1.4 KiB
Documentation
Welcome to the documentation for Photowall API 2.
Resources
Authentication
Authentication to the API is performed via HTTP Basic Auth. The user should provide her API key as the basic auth username parameter. An example request in cURL looks like this (adding a colon after the username prevents cURL from asking for a password):
$ curl https://api2.photowall.com/designers/ -u mykey:
API keys should be added to the API_KEYS configuration option
Pagination
All resources that returns a list of objects has support for pagination. Some examples are search results, product listings and so on. To use the pagination there are two (optional) query parameters that you need to know about:
pageThe page number starting from 1per_pageThe maxium number of items per page (default is 10)
An example request looks like this:
$ curl -X GET https://api2.photowall.com/designers/page=5&per_page=10 -u mykey:
The response will contain a pagination object with the following attributes:
pageThe current page numberpagesThe total number of pagesnext_numNumber of the next pageper_pageThe number of items to be displayed on a pagehas_nextTrue if a next page existshas_prevTrue if a previous page existstotalThe total number of items