Documentation ¶
Index ¶
Constants ¶
View Source
const BaseURI = "https://api.octopus.energy"
BaseURI is Octopus Energy's core API root.
View Source
const URI = BaseURI + "/v1/graphql/"
URI is the GraphQL query endpoint for Octopus Energy.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OctopusGraphQLClient ¶
type OctopusGraphQLClient struct { *graphql.Client // contains filtered or unexported fields }
OctopusGraphQLClient provides an interface for communicating with Octopus Energy's Kraken platform.
func NewClient ¶
func NewClient(log *util.Logger, apikey string) (*OctopusGraphQLClient, error)
NewClient returns a new, unauthenticated instance of OctopusGraphQLClient.
func (*OctopusGraphQLClient) AccountNumber ¶
func (c *OctopusGraphQLClient) AccountNumber() (string, error)
AccountNumber queries the Account Number assigned to the associated API key. Caching is provided.
func (*OctopusGraphQLClient) TariffCode ¶
func (c *OctopusGraphQLClient) TariffCode() (string, error)
TariffCode queries the Tariff Code of the first Electricity Agreement active on the account.
Click to show internal directories.
Click to hide internal directories.