Contents:
This API call returns all the photo categories (e.g. cycleparking,obstruction,etc.) and metacategories (e.g. good,bad,event,etc.) available in the Photomap (e.g. see the categorisation page or the legend on the main Photomap page).
The data will include a Unixtime value indicating the cache validity, e.g.: validuntil: 1284497262
. Clients should cache the data until this time.
Example which retrieves the data.
https://api.cyclestreets.net/v2/photomap.categories
Result:
{ "validuntil": 1402189242, "categories": { "cycleparking": { "name": "Cycle parking", "plural": "Cycle parking", "description": "Photos of parked cycles, on racks, railings, in shelters. Or photos of cycle racks themselves.", "iconProperties": "26x20,13x20,0x-20,37x22,15x20", "iconLocation": "/images/categories/iconsets/cyclestreets/svg/cycleparking_neutral.svg" }, "obstructions": { "name": "Obstruction", "plural": "Obstructions", "description": "A narrow place, difficult for cycles to pass.", "iconProperties": "33x20,17x20,0x-20,35x26,17x26", "iconLocation": "/images/categories/iconsets/cyclestreets/svg/obstructions_neutral.svg" }, … "general": { "name": "Other", "plural": "Other", "description": "A general photo.", "iconProperties": "12x20,6x20,0x-20,27x23,9x20", "iconLocation": "/images/categories/iconsets/cyclestreets/svg/general_neutral.svg" } }, "metacategories": { "bad": { "name": "Problem", "description": "A problem that needs to be fixed" }, "good": { "name": "Good practice", "description": "An example of good practice" }, "other": { "name": "Infrastructure", "description": "Other (infrastructure-related)" }, "any": { "name": "Misc", "description": "Non-specific" }, "event": { "name": "Event", "description": "Event or temporary issue" } } }
None.
JSON structure as per example above.
JSON object containing an error key and a text string.
Example error (text string will vary):
{
"error": "Problem retrieving the categories/metacategories."
}