Learn R Programming

RepoGenerator (version 0.0.1)

callGitHubAPI: callGitHubAPI

Description

Function for interacting with the GitHub API

Usage

callGitHubAPI(repoName, token, apiURL = "https://api.github.com",
  path = "/user/repos", encoding = c("json", "form"), method = httr::POST)

createGitHubRepo(repoName, token)

deleteGitHubRepo(owner, repoName, token)

checkGitHubRepoExists(owner, repoName, token)

Arguments

repoName

Name of repo to interact with

token

GitHub Personal Access Token: this should be the actual token, not the name of an environment variable

apiURL

The base URL for the GitHub API, this really should not need to be changed

path

The API endpoint

encoding

The type of encoding for the request, either json of form

method

The method to be used, as an R function, such as POST or GET

owner

GitHub username

Value

An API status

Functions

  • createGitHubRepo: Creating a GitHub Repo

  • deleteGitHubRepo: Deleting a GitHub Repo

  • checkGitHubRepoExists: Check that a GitHub Repo exists

Details

Builds up and executes a GitHub API request