get_repos: Make an API Call for a GitHub User's Remote Repositories

Description Usage Arguments Value See Also

View source: R/github_api.R

Description

Make an API call to the GitHub API to retrieve all the repository information for a GitHub User. All native fields in the JSON response are preserved with all the url fields returned with a terminal curly bracketed field such as "/id" are mutated with a corresponding "page" field with that terminal pattern removed to directly open the path in the browser if desired. Additionally, an "issues_page_url" and a "pages_url" fields are added for a direct url to the repository's issues page and GitHub Pages site, respectively. The url to the GitHub Pages is derived on that condition that the 'has_pages' field is TRUE for that repository. The value in this field is 'NA' if a GitHub Page does not exist for the repo. The same is done with the "issues_page_url" path except that no logic is applied since all GitHub repos will have an Issues page by default.

Usage

1
2
3
4
5
6
get_repos(
  github_user = "meerapatelmd",
  user_only = TRUE,
  per_page = 100,
  page = 1
)

Arguments

github_user

GitHub username. Enterprise GitHub is not supported.

user_only

If true, filters out any repos that were forked from another repo before returning value.

per_page

Query parameter.

page

Query parameter.

Value

JSON response parsed into a tibble.

See Also

GET,http_error,status_code,content toJSON, fromJSON rownames,as_tibble select,reexports,mutate_all,vars,select_all,mutate-joins,mutate str_replace


meerapatelmd/glitter documentation built on Sept. 9, 2021, 6:21 p.m.