Class: ScalrApiV2::Servers

Inherits:
Object
  • Object
show all
Defined in:
lib/scalr_api_v2/servers.rb

Overview

connection and request methods for interacting with the Scalr API

Instance Method Summary collapse

Constructor Details

#initializeServers

Returns a new instance of Servers.



7
8
9
10
# File 'lib/scalr_api_v2/servers.rb', line 7

def initialize
  @config = ScalrApiV2::Config.new.config
  @scalr = ScalrApiV2::Request.new
end

Instance Method Details

#listObject

List all scripts



13
14
15
16
# File 'lib/scalr_api_v2/servers.rb', line 13

def list
  list = @scalr.list(format('/api/v1beta0/%s/servers/', @config['mode_path']))
  return list
end