orderlyweb_api_client: Create a low-level OrderlyWeb client

Description Usage Arguments Examples

View source: R/api_client.R

Description

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

Usage

1
2
3
orderlyweb_api_client(host, port, token, name = NULL, https = TRUE,
  prefix = NULL, api_version = 1, 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 1.

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

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

vimc/orderlyweb documentation built on Jan. 29, 2020, 9:16 p.m.