Class: BWStatusBoardAPI::Client

Inherits:
Object
  • Object
show all
Includes:
Environments, Configuration, Connection, Performance, Request
Defined in:
lib/bw_status_board_api/client.rb,
lib/bw_status_board_api/client/environments.rb,
lib/bw_status_board_api/client/environments/services.rb

Overview

Client class to create BWStatusBoardAPI instances

Defined Under Namespace

Modules: Environments

Constant Summary

Constants included from Connection

BWStatusBoardAPI::Connection::RACK_BUILDER_CLASS

Instance Attribute Summary

Attributes included from Configuration

#adapter, #api_endpoint, #debug, #logger, #performance, #user_agent, #verify_ssl

Instance Method Summary collapse

Methods included from Environments

#environments

Methods included from Environments::Services

#services

Methods included from Performance

#average_response_time, #average_response_time_breakdown, #fastest_response, #response_paths, #slowest_response, #total_responses

Methods included from Request

#delete, #get, #patch, #post, #put

Methods included from Configuration

#configure, #destroy, keys, #reset

Constructor Details

#initialize(options = {}) ⇒ Client

Initializes Client



23
24
25
26
27
# File 'lib/bw_status_board_api/client.rb', line 23

def initialize(options = {})
  BWStatusBoardAPI::Configuration.keys.each do |key|
    instance_variable_set(:"@#{key}", options[key] || BWStatusBoardAPI.instance_variable_get(:"@#{key}"))
  end
end

Instance Method Details

#api_endpoint=(value) ⇒ Object



29
30
31
32
# File 'lib/bw_status_board_api/client.rb', line 29

def api_endpoint=(value)
  reset_connection
  @api_endpoint = value
end

#connection_options=(value) ⇒ Object



34
35
36
37
# File 'lib/bw_status_board_api/client.rb', line 34

def connection_options=(value)
  reset_connection
  @connection_options = value
end

#debug=(value) ⇒ Object



39
40
41
42
# File 'lib/bw_status_board_api/client.rb', line 39

def debug=(value)
  reset_connection
  @debug = value
end

#logger=(value) ⇒ Object



44
45
46
47
# File 'lib/bw_status_board_api/client.rb', line 44

def logger=(value)
  reset_connection
  @logger = value
end