Class: BWStatusBoardAPI::Client

Inherits:
Object
  • Object
show all
Includes:
Boards, Environments, Metrics, Configuration, Connection, Performance, Request
Defined in:
lib/bw_status_board_api/client.rb,
lib/bw_status_board_api/client/boards.rb,
lib/bw_status_board_api/client/metrics.rb,
lib/bw_status_board_api/client/environments.rb,
lib/bw_status_board_api/client/helpers/filter.rb,
lib/bw_status_board_api/client/environments/services.rb

Overview

Client class to create BWStatusBoardAPI instances

Defined Under Namespace

Modules: Boards, Environments, Helpers, Metrics

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 Metrics

#total_boards, #total_environment_services, #total_environments, #total_failing_environments, #total_failing_services, #total_partially_successful_environments, #total_services, #total_successful_environments, #total_successful_services

Methods included from Helpers

#filter

Methods included from Environments::Services

#create_service, #delete_service, #failing_services, #patch_service, #service, #services, #services_summary, #successful_services, #update_service

Methods included from Environments

#create_environment, #delete_environment, #environment, #environments, #environments_summary, #failing_environments, #partially_successful_environments, #patch_environment, #successful_environments, #update_environment

Methods included from Boards

#board, #boards, #boards_summary, #create_board, #delete_board, #patch_board, #update_board

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



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

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



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

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

#connection_options=(value) ⇒ Object



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

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

#debug=(value) ⇒ Object



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

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

#logger=(value) ⇒ Object



48
49
50
51
# File 'lib/bw_status_board_api/client.rb', line 48

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