Given a list, extract items based on their name

Usage,
extract_entries(api_list, entry_name, fixed = TRUE)

Arguments

api_list

a list (probably from the GitHub api)

entry_name

the name of the entry to be extracted from the api list e.g. "html_url"

fixed

TRUE/FALSE whether or not the exact string should be used. FALSE would mean regex will be interpretted.

Value

a subset of api_list that only contains items with the entry_name string in the name.

Examples


repo_info <- get_repo_info("jhudsl/Documentation_and_Usability")
#> Error in throw(new_error("gitcreds_not_interactive_error", message = "`gitcreds_set()` only works in interactive sessions")): `gitcreds_set()` only works in interactive sessions

extract_entries(repo_info, "release", fixed = TRUE)
#> Error in unlist(api_list): object 'repo_info' not found