Get the list of values from a Graph pager object
extract_list_values(pager, n = Inf)
An object of class
The number of items from the list to return. Note this is not the number of pages (each page will usually contain multiple items). The default value of
This is a convenience function to perform the common task of extracting all or some of the items from a paged response.
Inf or a number, the items from the paged query results. The format of the returned value depends on the pager settings. This will either be a nested list containing the properties for each of the items; a list of R6 objects; or a data frame. If the pager is empty, an error is thrown.
n is NULL, the pager itself is returned.
ms_graph_pager, ms_object, call_graph_endpoint
## Not run: firstpage <- call_graph_endpoint(token, "me/memberOf") pager <- ms_graph_pager$new(token, firstpage) extract_list_values(pager) # trying to extract values a 2nd time will fail try(extract_list_values(pager)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.