Description Usage Arguments Value See Also Examples
Get a response from the GitHub API.
1 |
path |
A string formatted as "owner/repo/subdir" or "owner/repo/subdir@branch", e.g.: "maurolepore/ghr/reference@gh-pages". |
ref |
Branch name. |
... |
Arguments passed to |
A list.
ghr_fields
Other functions to get github responses: ghr_show_branches
1 2 3 4 5 6 7 8 9 10 11 12 13 | # The request to GitHub happens only the first time you call ghr_get()
system.time(ghr_get("maurolepore/ghr"))
# Later calls take no time because the first call is memoised
system.time(ghr_get("maurolepore/ghr"))
gh_response <- ghr_get("maurolepore/ghr")
class(gh_response)
length(gh_response)
str(gh_response[[1]])
ghr_pull(ghr_get("maurolepore/ghr", ref = "gh-pages"), "path")
# Same
ghr_pull(ghr_get("maurolepore/ghr@gh-pages"), "path")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.