class ScalrApiV2::Farms
connection and request methods for interacting with the Scalr API
Public Class Methods
new()
click to toggle source
# File lib/scalr_api_v2/farms.rb, line 7 def initialize @config = ScalrApiV2::Config.new.config @scalr = ScalrApiV2::Request.new end
Public Instance Methods
get_farm(farm_id)
click to toggle source
List farm details
# File lib/scalr_api_v2/farms.rb, line 19 def get_farm(farm_id) list = @scalr.list(format('/api/v1beta0/%s/farms/%s', @config['mode_path'], farm_id)) return list end
list()
click to toggle source
List all scripts
# File lib/scalr_api_v2/farms.rb, line 13 def list list = @scalr.list(format('/api/v1beta0/%s/farms/', @config['mode_path'])) return list end
list_farm_servers(farm_id)
click to toggle source
List farm details
# File lib/scalr_api_v2/farms.rb, line 25 def list_farm_servers(farm_id) list = @scalr.list(format('/api/v1beta0/%s/farms/%s/servers/', @config['mode_path'], farm_id)) return list end