Use GitHub search API to search for YML files in phuse-scripts repository and output the list.
search_api(file_ext = "yml",
gh_api = "https://api.github.com/search/code",
rp_name = "phuse-org/phuse-scripts",
rep_url = "https://github.com/phuse-org/phuse-scripts",
rep_dir = "tree/master",
rep_base = "https://raw.githubusercontent.com/phuse-org/phuse-scripts/master",
loc_base = "C:/myCodes/phuse-org/phuse-scripts", filename = NULL,
search_for = NULL, size = NULL, path = NULL)
file extension; default to 'yml'
GitHub API URL; default to 'https://api.github.com/search/code'
repository name; default to 'phuse-org/phuse-scripts'
a URL for a remote repository and default to 'https://github.com/phuse-org/phuse-scripts'
rep dir for file name; default to 'tree/master'
a URL for repository base folder; default to "https://github.com/phuse-org/phuse-scripts/raw/master"
a URL for repository base folder; default to "C:/myCodes/phuse-org/phuse-scripts"
file names to be searched; default to null
text or key word to be searched in the files; defualt to null.
file size; default to null
file path; default to null
a list of YML files
# NOT RUN {
r1 <- search_api('yml')
# }
Run the code above in your browser using DataLab