Skip to content

Commit

Permalink
Issue #40 Add note about pagination in the main README file
Browse files Browse the repository at this point in the history
  • Loading branch information
d34dman committed Mar 12, 2024
1 parent 29aaf3f commit f9700fb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Use to restrict max amount of items returned in the listing. Using this for pagi

[Read more about Pagination in Drupal.org Documentation](https://www.drupal.org/docs/8/core/modules/jsonapi-module/pagination)


### addPageOffset

Use to skip some items items from start of the listing. Please note that this is not the page number. To get the offset number for a page you can
Expand All @@ -162,6 +163,14 @@ multiply the number of pages you want to skip with items per page.

[Read more about Pagination in Drupal.org Documentation](https://www.drupal.org/docs/8/core/modules/jsonapi-module/pagination)

**NOTE**

JSON:API response have pagination information build into the response. Based on the results in the response, you can get "previous" and "next" links which can be used
to get further items when results overflows into multiple pages.

If you are looking for a practical guide, you can check out the example in this issue on GitHub https://github.com/d34dman/drupal-jsonapi-params/issues/40


### addFields

The name of this method might be miss leading. Use this to explicitely request for specific fields on an entity.
Expand Down

0 comments on commit f9700fb

Please sign in to comment.