circle: Circle CI HTTP Requests

View source: R/circle.R

circleR Documentation

Circle CI HTTP Requests

Description

Workhorse function for executing API requests to Circle CI.

Usage

circle(
  verb = "GET",
  path = "",
  query = list(),
  body = "",
  api_version = "v2",
  encode = "json"
)

Arguments

verb

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

path

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

query

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

body

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

api_version

⁠[character]⁠
A character string specifying the Circle CI API version. This usually does not need to be changed by the user.

encode

⁠[character]⁠
Encoding format. See httr::POST.

Details

In almost all cases, users should not need to execute API calls directly. However, if desired this functions makes it possible to issue any API request. If you experience calling a custom request heavily, consider opening a feature request on GitHub.

Value

An object of class circle_api with the following elements

  • content (queried content)

  • path (API request)

  • response (HTTP response information)

Examples

## Not run: 
circle(verb = "GET", path = "/project/gh/ropensci/circle/checkout-key")

## End(Not run)

pat-s/circle documentation built on Aug. 4, 2024, 9:12 a.m.