search_api: Search GitHub and build a script index data frame

Description Usage Arguments Value Author(s) Examples

View source: R/search_api.R

Description

Use GitHub search API to search for YML files in phuse-scripts repository and output the list.

Usage

1
2
3
4
5
6
7
8
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)

Arguments

file_ext

file extension; default to 'yml'

gh_api

GitHub API URL; default to 'https://api.github.com/search/code'

rp_name

repository name; default to 'phuse-org/phuse-scripts'

rep_url

a URL for a remote repository and default to 'https://github.com/phuse-org/phuse-scripts'

rep_dir

rep dir for file name; default to 'tree/master'

rep_base

a URL for repository base folder; default to "https://github.com/phuse-org/phuse-scripts/raw/master"

loc_base

a URL for repository base folder; default to "C:/myCodes/phuse-org/phuse-scripts"

filename

file names to be searched; default to null

search_for

text or key word to be searched in the files; defualt to null.

size

file size; default to null

path

file path; default to null

Value

a list of YML files

Author(s)

Hanming Tu

Examples

1
2
3
4
## Not run: 
  r1 <- search_api('yml')

## End(Not run)

phuse documentation built on March 26, 2020, 6:31 p.m.