Skip to contents

This function pings the API to check if it is available.

Usage

api_ping(x)

Arguments

x

A character string specifying the API host to be pinged or an object of class ApiCredentials.

Value

A list containing the response from the API. Throws an error if the API is not available.

See also

api_login() to retrieve the login object.

api_info() to retrieve information about the API.

Examples

if (FALSE) { # \dontrun{
api_ping("https://api.example.com")

creds <- api_login("https://api.example.com", "username", "password")
api_ping(creds)
} # }