Commit 95a92250 authored by Jonathan Hunt's avatar Jonathan Hunt

#53 Add notes re possible pagination change.

parent 0ecbc2fe
......@@ -107,7 +107,10 @@ function _climbnz_api_node_comments($node) {
/**
* Return Places according to filter parameters.
*
* Supports pagination per page[number] and page[size] parameters.
* Supports pagination per page[number] and page[size] parameters per
* https://jsonapi.org/format/1.1/#fetching-pagination
* but Drupal jsonapi uses page[offset] and page[limit]
* https://www.drupal.org/docs/8/modules/jsonapi/pagination
*
* @todo: use a view?
*/
......
......@@ -23,9 +23,12 @@ function climbnz_api_default_services_endpoint() {
),
'services_basic_auth' => 'services_basic_auth',
);
// Response formatters per /admin/structure/services/list/climbnz_api1/server
$endpoint->server_settings = array(
'formatters' => array(
'api+json' => TRUE,
'api+json' => TRUE, // json api.
'vnd.api+json' => TRUE, // or is this json api?
//'vnd.climbnz.v0.1.api+json' => TRUE,
'hal+json' => TRUE,
'xml' => TRUE,
'json' => TRUE,
......@@ -37,6 +40,7 @@ function climbnz_api_default_services_endpoint() {
),
'parsers' => array(
'application/json' => TRUE,
'application/vnd.api+json' => TRUE, // jsonapi
'application/xml' => TRUE,
'multipart/form-data' => TRUE,
'text/xml' => TRUE,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment