travis: Travis CI HTTP Requests

View source: R/travis.R

travisR Documentation

Travis CI HTTP Requests

Description

This is the workhorse function for executing API requests for Travis CI.

Usage

travis(
  verb = "GET",
  path = "",
  query = list(),
  body = "",
  endpoint = get_endpoint(),
  encode = "json"
)

Arguments

verb

A character string containing an HTTP verb, defaulting to GET.

path

A character string with the API endpoint (should begin with a slash).

query

A list specifying any query string arguments to pass to the API. This is used to pass the API token.

body

A named list or character string of what should be passed in the request. Corresponds to the "-d" argument of the curl command.

endpoint

[string]
Which Travis endpoint to use. Defaults to ".org". Accepted values are ".com" and ".org". Can be set globally via env var R_TRAVIS.

encode

Encoding format. See httr::POST.

Details

This is mostly an internal function for executing API requests. In almost all cases, users do not need to access this directly.

Value

The JSON response, or the relevant error.


ropenscilabs/travis documentation built on May 18, 2022, 8:33 p.m.