Contents:
This API call is used to add a Photo Gallery. Each Gallery has a collection of photos attached.
The Gallery is an ideal campaigning tool to enable citizens to visually document problems such as lack of cycle parking, or to highlight good practice, so that this data can be used by cycle campaign groups, Local Authorities and others.
Example which adds a Gallery representing a cycle parking problem, including a photos of the situation, and supplying some additional information in the description.
This call requires a POST operation.
POST https://api.cyclestreets.net/v2/galleries.add/ ( [username] => myusername [password] => mypassword1992 [title] => Cycleparking problem in King's Cross Station [description] => 4 welcome new racks, for 8 bikes, have been installed at the station. Yet, many more are needed. [photos] => 301-303,401 )
Result:
{ "id": 320, "url": "https://www.cyclestreets.net/galleries/320/" }
You could later retrieve the data via a request to galleries.show
as follows:
https://api.cyclestreets.net/v2/galleries.show?id=300
The following are required parameters.
None.
JSON object as above, showing the unique ID and URL of the added Gallery.
You may wish to use these to show the successfully uploaded Gallery to the user by way of a confirmation screen, and/or invite the user to share the link on social media.
JSON object containing an error key and a text string.
The error string from this method is suitable for passing directly on to the user.
Example error (text string may vary):
{ "error": "A username and password must both be supplied." }