Places (Search) API China - BETA Developer's Guide

Object Structure For Paginateable Collections

Paginateable Collections

User objects contain additional attributes to describe a user.

Paginateble collections are represented as individual pages (a slice of all elements of the collection) that contain mechanisms to access the next page. For example:

{
  "available": 26,
  "next": "http://alphabet.com/page/3",
  "offset": 3,
  "items": ["d", "e", "f"]
}

Paginateble collections contain the following attributes:

Attribute Type Description
items Array[Object]; optional An array containing the objects of the current page of the collection (for example, images). If a collection is empty, the items attribute is not present. The type of the objects in the array depend on the collection.
next String (URI); optional) The URI to the subresource holding the next page of the collection. If the current page is the last page of the collection, the attribute is not present.
available Number (positive integer); optional The total number of items available for a place. For example, if a place has 50 images, this would be 50.
Note: It is not possible to always calculate the total number of elements in a collection. So the attribute might be missing, or just contain an estimate. Clients MUST not rely on the presence of the attribute but instead rely only on the existence of the next attribute to find out if additional items are available.
offset Number (positive integer); optional Pages other than the first page of a collection may include this attribute. If present, it contains the index of the first item in the current page.