Donate using PayPal

CycleStreets API (v2)

  • Details for:
  • API overview
  • Obtain API key
  • Usage policy
  • Uptime policy

List galleries

This API call returns a list of the Photo Galleries available.

Example

Example which retrieves the data.

https://api.cyclestreets.net/v2/galleries.list?fields=id,title,description,photos,datetime,galleryHref

Result:

{
    "galleries": [
        {
            "id": 16,
            "title": "Cambridge Beer Festival",
            "description": "Bikes parked everywhere at Cambridge Beer Festival (Summer 2007).",
            "photos": [
                10953,
                10954,
                10955,
                10956
            ],
            "datetime": 1180356907
        },
        {
            "id": 31,
            "title": "Cambridge city centre signage",
            "description": "Signs in Cambridge city centre",
            "photos": [
                11349,
                11348,
                11347,
                11346,
                11345,
                11343,
                11342,
                11341,
                11340,
                11338,
                11337,
                11336,
                11335,
                11334,
                11332,
                11331,
                11330
            ],
            "datetime": 1187540355
        },
        ...
    ]
}

Request parameters - required

None.

Request parameters - optional

fields string, comma-separated list of fields from the list below

Controls what information is returned; the fields id, title, description, photos and datetime are included by default.

Available fields are:

  • id Unique identifier for the gallery
  • title Gallery title
  • description Gallery description
  • photos Array of constituent photos in the gallery
  • datetime Datetime as a Unixtime timestamp; NB the format can be changed using the datetime parameter (see below)
  • galleryHref URL link to the gallery
  • galleryUpdateHref URL link to the gallery update page

datetime string

If specified, the datetime field (if requested in the fields list) will be converted from unixtime (the default output format) to a formatted version; the available output formats are:

  • friendly A friendly format suitable for showing on a webpage, e.g. '6:55pm, 4th October 2013'; this is equivalent to date ('g:ia, jS F Y', $date) in PHP
  • friendlydate A friendly date format suitable for showing on a webpage, e.g. '4th October, 2013'; this is equivalent to date ('jS F, Y', $date) in PHP
  • sqldatetime SQL DATETIME format (i.e. simplified ISO 8601 format): YYYY-MM-DD HH:MM:SS
  • unixtime Unixtime (the default)

Response

JSON structure as per example above.

If no galleries are found, the call will return an empty array.

Error response

None.

We welcome your feedback, especially to report bugs or give us route feedback.

My comments relate to: *






Your comments: *
URL of page: * https://oxford.cyclestreets.net/api/v2/galleries.list/
How did you find out about CycleStreets?:
Your name:
Our ref: Please leave blank - anti-spam measure

* Items marked with an asterisk [*] are required fields and must be fully completed.