Method: Cloudfuji::Command.get_command
- Defined in:
- lib/cloudfuji/command.rb
.get_command(url, params = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/cloudfuji/command.rb', line 12 def get_command(url, params={}) @@request_count += 1 params.merge!({:auth_token => Cloudfuji::Platform.key}) if params[:auth_token].nil? unless Cloudfuji::Platform.key.nil? begin raw = RestClient.get(url, {:params => params, :accept => :json}) rescue # => e # puts e.inspect @@last_request_successful = false return nil end @@last_request_successful = true @@last_request = JSON(raw) end |