Module: Cephalopod
- Extended by:
- Cephalopod
- Included in:
- Cephalopod
- Defined in:
- lib/cephalopod.rb,
lib/cephalopod/types.rb,
lib/cephalopod/adaptor.rb,
lib/cephalopod/version.rb,
lib/cephalopod/response.rb,
lib/cephalopod/models/gsp.rb,
lib/cephalopod/repos/base.rb,
lib/cephalopod/models/base.rb,
lib/cephalopod/models/link.rb,
lib/cephalopod/models/charge.rb,
lib/cephalopod/models/product.rb,
lib/cephalopod/models/consumption.rb,
lib/cephalopod/models/meter_point.rb,
lib/cephalopod/repos/v1/gsp/resource.rb,
lib/cephalopod/models/product_summary.rb,
lib/cephalopod/repos/v1/products/resource.rb,
lib/cephalopod/repos/v1/products/collection.rb,
lib/cephalopod/repos/v1/gas_meter_points/resource.rb,
lib/cephalopod/models/products/dual_register_charge.rb,
lib/cephalopod/models/products/single_register_charge.rb,
lib/cephalopod/repos/v1/electricity_meter_points/resource.rb,
lib/cephalopod/repos/v1/gas_meter_points/consumption/collection.rb,
lib/cephalopod/repos/v1/electricity_meter_points/consumption/collection.rb,
lib/cephalopod/repos/v1/products/tariffs/gas/standing_charges/collection.rb,
lib/cephalopod/repos/v1/products/tariffs/gas/standard_unit_rates/collection.rb,
lib/cephalopod/repos/v1/products/tariffs/electricity/day_unit_rates/collection.rb,
lib/cephalopod/repos/v1/products/tariffs/electricity/night_unit_rates/collection.rb,
lib/cephalopod/repos/v1/products/tariffs/electricity/standing_charges/collection.rb,
lib/cephalopod/repos/v1/products/tariffs/electricity/standard_unit_rates/collection.rb
Defined Under Namespace
Modules: Models, Repos, Types
Classes: Adaptor, Error, Response
Constant Summary
collapse
- VERSION =
"0.2.0"
Instance Method Summary
collapse
Instance Method Details
#client ⇒ Object
58
59
60
|
# File 'lib/cephalopod.rb', line 58
def client
@client ||= Cephalopod::Adaptor.new(**config)
end
|
#config ⇒ Object
51
52
53
54
55
56
|
# File 'lib/cephalopod.rb', line 51
def config
@config ||= {
base_url: 'https://api.octopus.energy',
api_key: 'api_key'
}
end
|
47
48
49
|
# File 'lib/cephalopod.rb', line 47
def configure(&block)
yield(config)
end
|
#electrical_consumption(mpan:, serial_number:, **args) ⇒ Object
#gas_consumption(mpan:, serial_number:, **args) ⇒ Object
#grid_supply_point(postcode:) ⇒ Object
#products(*args) ⇒ Object