Class: ElasticWeb::Client

Inherits:
Object
  • Object
show all
Includes:
Accounts, Aliases, Billing, Connection, DNS, Databases, Domains, NGINXConfigurations, Servers, User, HTTParty
Defined in:
lib/elasticweb/client.rb,
lib/elasticweb/client/dns.rb,
lib/elasticweb/client/user.rb,
lib/elasticweb/client/errors.rb,
lib/elasticweb/client/aliases.rb,
lib/elasticweb/client/billing.rb,
lib/elasticweb/client/domains.rb,
lib/elasticweb/client/servers.rb,
lib/elasticweb/client/accounts.rb,
lib/elasticweb/client/databases.rb,
lib/elasticweb/client/connection.rb,
lib/elasticweb/client/accounts/cron.rb,
lib/elasticweb/client/databases/users.rb,
lib/elasticweb/client/nginx_configurations.rb

Defined Under Namespace

Modules: Accounts, Aliases, Billing, Connection, DNS, Databases, Domains, NGINXConfigurations, Servers, User Classes: Errors

Instance Method Summary collapse

Methods included from Billing

#operation_types, #operations

Methods included from Databases

#create_database, #databases, #delete_database

Methods included from Databases::Users

#create_database_user, #database_user_info, #databases_users, #delete_database_user, #update_database_user

Methods included from DNS

#create_dns, #delete_dns, #dns, #domain_dns

Methods included from NGINXConfigurations

#nginx_configurations

Methods included from Domains

#create_domain, #delete_domain, #domains, #update_domain

Methods included from Aliases

#aliases, #create_alias, #delete_alias, #update_alias

Methods included from Servers

#servers

Methods included from Accounts

#accounts, #create_account, #delete_account, #update_account

Methods included from Accounts::Cron

#update_cron

Methods included from User

#me

Methods included from Connection

#delete, #get, #post, #put

Constructor Details

#initialize(access_token = nil) ⇒ Client

Returns a new instance of Client.



30
31
32
33
# File 'lib/elasticweb/client.rb', line 30

def initialize(access_token = nil)
  access_token ||= ENV['ELASTICWEB_ACCESS_TOKEN']
  self.class.default_options.merge!(headers: { 'X-API-KEY' => access_token })
end