pagination_helper | R Documentation |
Many of last.fm API responses are paginated with a page size maximum of 50. lastfmr provides a series of functions that help to deal with these pages.
End-users are not expected to interact with these functions directly in most cases since pagination is already taken into account when invoking the raw or tidy data request functions.
Note that some endpoints return pagination based on OpenSearch query results and information about next pages, etc. are stored in slightly different ways.
get_current_page()
and get_total_pages()
return the current page of a
response and the total number of pages available, respectively.
has_next_page()
checks if there are more pages after the current page.
get_current_page(resp) get_total_pages(resp) has_next_page(resp) get_response_attr(resp)
resp |
lastfm object |
get_current_page()
returns an integer
has_next_page()
returns a boolean
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.