ghr_show_fields: Show and pull available fields of a GitHub response.

Description Usage Arguments Value See Also Examples

View source: R/ghr_show_fields.R

Description

Show and pull available fields of a GitHub response.

Usage

1
2
3
ghr_show_fields(gh_response)

ghr_pull(gh_response, field)

Arguments

gh_response

A list object of class "gh_response".

field

Character string giving the name of the the element to extract from the github-response list.

Value

A character string.

See Also

ghr_get gh_branches

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
gh_response <- ghr_get("maurolepore/ghr/R")

ghr_show_fields(gh_response)

ghr_pull(gh_response, "name")

# Working with non-default branches
ghr_pull(ghr_get("maurolepore/ghr", ref = "gh-pages"), "path")
# Same
ghr_pull(ghr_get("maurolepore/ghr@gh-pages"), "path")

ghr_pull(ghr_get("maurolepore/ghr/reference@gh-pages"), "path")

maurolepore/ghr documentation built on May 18, 2019, 12:26 p.m.