Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gh_next

Get the next, previous, first or last page of results


Description

Get the next, previous, first or last page of results

Usage

gh_next(gh_response)

gh_prev(gh_response)

gh_first(gh_response)

gh_last(gh_response)

Arguments

gh_response

An object returned by a gh() call.

Details

Note that these are not always defined. E.g. if the first page was queried (the default), then there are no first and previous pages defined. If there is no next page, then there is no next page defined, etc.

If the requested page does not exist, an error is thrown.

Value

Answer from the API.

See Also

The .limit argument to gh() supports fetching more than one page.

Examples

x <- gh("/users")
vapply(x, "[[", character(1), "login")
x2 <- gh_next(x)
vapply(x2, "[[", character(1), "login")

gh

'GitHub' 'API'

v1.3.0
MIT + file LICENSE
Authors
Gábor Csárdi [cre, ctb], Jennifer Bryan [aut], Hadley Wickham [aut], RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.