Skip to content

Commit

Permalink
Make a package-level help topic
Browse files Browse the repository at this point in the history
  • Loading branch information
jennybc committed Aug 12, 2020
1 parent 6d210e9 commit 6f48d43
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 42 deletions.
14 changes: 14 additions & 0 deletions R/gh-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#' @keywords internal
#' @aliases gh-package
"_PACKAGE"

# The following block is used by usethis to automatically manage
# roxygen namespace tags. Modify with care!
## usethis namespace: start
#' @importFrom httr content add_headers headers status_code http_type GET POST
#' PATCH PUT DELETE
#' @importFrom jsonlite fromJSON toJSON
#' @importFrom utils URLencode capture.output
#' @importFrom cli cli_status cli_status_update
## usethis namespace: end
NULL
15 changes: 0 additions & 15 deletions R/package.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@

#' GitHub API
#'
#' Minimal wrapper to access GitHub's API.
#'
#' @docType package
#' @name gh
"_PACKAGE"

#' Query the GitHub API
#'
#' This is an extremely minimal client. You need to know the API
Expand Down Expand Up @@ -75,11 +66,6 @@
#' `list`. Failed requests will generate an R error. Requests that
#' generate a raw response will return a raw vector.
#'
#' @importFrom httr content add_headers headers
#' status_code http_type GET POST PATCH PUT DELETE
#' @importFrom jsonlite fromJSON toJSON
#' @importFrom utils URLencode capture.output
#' @importFrom cli cli_status cli_status_update
#' @export
#' @seealso [gh_gql()] if you want to use the GitHub GraphQL API,
#' [gh_whoami()] for details on GitHub API token management.
Expand Down Expand Up @@ -157,7 +143,6 @@
#' "Content-Type" = "application/json"
#' )
#' )

gh <- function(endpoint, ..., per_page = NULL, .token = NULL, .destfile = NULL,
.overwrite = FALSE, .api_url = NULL, .method = "GET",
.limit = NULL, .accept = "application/vnd.github.v3+json",
Expand Down
34 changes: 34 additions & 0 deletions man/gh-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 1 addition & 27 deletions man/gh.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6f48d43

Please sign in to comment.