Module: Tibber
- Extended by:
- WrAPI::Configuration, WrAPI::RespondTo
- Defined in:
- lib/tibber.rb,
lib/tibber/api.rb,
lib/tibber/const.rb,
lib/tibber/error.rb,
lib/tibber/client.rb,
lib/tibber/request.rb,
lib/tibber/version.rb,
lib/tibber/authorization.rb
Overview
The ‘Tibber` module provides an API client for interacting with the Tibber GraphQL API. It extends `WrAPI::Configuration` and `WrAPI::RespondTo`, enabling configuration handling.
Defined Under Namespace
Modules: Authentication, Request Classes: API, AuthenticationError, Avatar, Client, ConfigurationError, Enum, GraphQLError, HomeType, Resolution, Screens, TibberError
Constant Summary collapse
- DEFAULT_UA =
Default User-Agent string for API requests.
"Ruby Tibber API client #{Tibber::VERSION}"- DEFAULT_ENDPOINT =
Default API endpoint for Tibber.
'https://api.tibber.com/v1-beta/gql'- VERSION =
'0.2.0'
Class Method Summary collapse
-
.client(options = {}) ⇒ Tibber::Client
Creates a new instance of the Tibber API client.
-
.reset ⇒ void
Resets the Tibber module’s configuration to default values.
Class Method Details
.client(options = {}) ⇒ Tibber::Client
Creates a new instance of the Tibber API client.
39 40 41 |
# File 'lib/tibber.rb', line 39 def self.client( = {}) Tibber::Client.new({ user_agent: DEFAULT_UA, endpoint: DEFAULT_ENDPOINT }.merge()) end |
.reset ⇒ void
This method returns an undefined value.
Resets the Tibber module’s configuration to default values.
49 50 51 52 53 54 |
# File 'lib/tibber.rb', line 49 def self.reset super self.endpoint = nil self.user_agent = DEFAULT_UA self.endpoint = DEFAULT_ENDPOINT end |