orderlyweb_api_client: Create a low-level OrderlyWeb client

View source: R/api_client.R

orderlyweb_api_clientR Documentation

Create a low-level OrderlyWeb client

Description

Create a low-level HTTP API client for use with OrderlyWeb.

Usage

orderlyweb_api_client(host, port, token, name = NULL, https = TRUE,
  prefix = NULL, api_version = 2, insecure = FALSE,
  verbose = FALSE)

Arguments

host

Fully qualified hostname for the OrderlyWeb instance

port

Port to use

token

Your application token for authentication. The appropriate value here will depend on the authentication support that is built into the OrderlyWeb server that you are communicating with. Provide the token directly (as a string) or provide a callback function that takes no arguments and returns token.

name

A friendly name for the server (e.g, "production" or "testing") which may be printed when using the remote, or when authenticating. If not provided then a name will be constructed from host, port and (if provided) prefix.

https

Optional logical, indicating if this is an https connection - this should be TRUE in all production settings or credentials will be sent in the clear!

prefix

A prefix, if your OrderlyWeb server is mounted at a path within some larger website.

api_version

The API version to request - this should be left as 2.

insecure

Avoid SSL certificate testing - this is completely insecure (as bad as http) and exists only for testing.

verbose

Be verbose in all http exchanges. This will be very noisy.

Examples

cl <- orderlyweb::orderlyweb_api_client(host = "example.com", port = 443,
                                        token = "mytoken")
cl$is_authorised()

vimc/orderlyweb documentation built on Feb. 9, 2023, 8:36 a.m.