get_products {octopusR}R Documentation

Return a list of energy products

Description

By default, results will be public energy products but if authenticated organisations will also see products available to their organisation.

Usage

get_products(
  is_variable = NULL,
  is_green = NULL,
  is_tracker = NULL,
  is_prepay = NULL,
  is_business = FALSE,
  available_at = Sys.Date(),
  authenticate = FALSE,
  api_key = NULL
)

Arguments

is_variable

(boolean, optional) Show only variable products.

is_green

(boolean, optional) Show only green products.

is_tracker

(boolean, optional) Show only tracker products.

is_prepay

(boolean, optional) Show only pre-pay products.

is_business

(boolean, default: FALSE) Show only business products.

available_at

Show products available for new agreements on the given datetime. Defaults to current datetime, effectively showing products that are currently available.

authenticate

(boolean, default: FALSE) Use an api_key to authenticate. Only useful for organisations.

api_key

Your API key. If you are an Octopus Energy customer, you can generate an API key on the developer dashboard.

Value

a tibble

Examples

get_products(is_green = TRUE)

[Package octopusR version 1.0.1 Index]