download_gist: Download a gist from GitHub

Description Usage Arguments Value Examples

Description

This function downloads the files in the specified gist to the path provided.

Usage

1
download_gist(gist, path, files, ...)

Arguments

gist

(string) The ID of the gist.

path

(string) The path to download the gist to.

files

(character, optional) The files to download. If not specified all the files in the gist will be downloaded.

...

Parameters passed to gh_request().

Value

download_gist() returns the path where the file is downloaded to.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 

  # Download all the files in a gist
  download_gist("806dca6b09a39e7b6326a0c8137583e6", "./gist")

  # Download a single file in a gist
  download_gist(
    gist  = "806dca6b09a39e7b6326a0c8137583e6",
    path  = "./gist",
    files = "helloworld.R"
  )


## End(Not run)

ChadGoymer/githapi documentation built on Oct. 22, 2021, 10:56 a.m.