vsts_run_command {vstsr}R Documentation

Azure DevOps Custom API Calls

Description

For any requirement not currently in place in the vstsr package, then this function will allow you to use the relevant API call without any extra requirements.

For the most part it is just a shell of VERB but will have the auth_key set up already.

Usage

vsts_run_command(url, verb, auth_key, body = NULL, query = NULL)

Arguments

url

the URI of the API call to run

verb

name of the verb to use

auth_key

authentication key generated by using vsts_auth_key

body

check VERB for more details. If the object is a named list, then it will be transformed into a JSON string so that can be added to the call. Use https://docs.microsoft.com/en-us/rest/api/azure/devops to find out any required parameter for the body.

query

a list of extra parameters that can be sent to the API call. If not required then leave as NULL

Examples

## Not run: 
auth_key <- vsts_auth_key("<username>", "<password>")
# Get commits of a repository
URL <- file.path(
  "https://dev.azure.com",
  domain,
  project,
  "_apis/git/repositories",
  repository_id,
  "commits?api-version=5.0"
)
vsts_run_command(URL, "GET", auth_key)

## End(Not run)


[Package vstsr version 1.1.0 Index]