repo_get_raw_file: Get a file from a repository

Description Usage Arguments Value Examples

Description

Get a file from a repository

Usage

1
2
3
repo_get_raw_file(owner, repo, filepath,
  api_endpoint = Sys.getenv("GITEA_BASE_URL"),
  gitea_token = Sys.getenv("GITEA_PAT"))

Arguments

owner

owner of the repo

repo

name of the repo

filepath

filepath of the file to get

api_endpoint

URL prefix for your gitea server (no trailing '/')

gitea_token

NOTE: we use access_token in the package

Value

if MIME type was intuited and httr::content() can decode it, then a decoded object, otherwise a raw vector

Examples

1
2
3
4
5
## Not run: 
repo_get_raw_file("hrbrmstr", "ggalt", "/man/figures/coordproj01.png")
repo_get_raw_file("hrbrmstr", "securitytxt", "/R/RcppExports.R")

## End(Not run)

hrbrmstr/crumpets documentation built on May 4, 2019, 8:40 a.m.