Method: BBGAPI::LB_Services.only_name_id

Defined in:
lib/bbgapi/lb_services.rb

.only_name_idObject



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/bbgapi/lb_services.rb', line 115

def self.only_name_id
  begin
    cur_app = BBGAPI::LB_Applications.get_app
  rescue
    cur_app = self.recurse
  end

  partial = "/api/lb_applications/#{cur_app}/lb_services"
  api_response = BBGAPI::Client.geturl(partial,"")
  services = []
  api_response.each {|x|
    services << {"name" => "#{x["name"]}","id" => "#{x["id"]}"}
  }
  return services
end