Class: DTK::Client::Execute::Command::APICall

Inherits:
DTK::Client::Execute::Command show all
Defined in:
lib/execute/command/api_call.rb,
lib/execute/command/api_call/map.rb,
lib/execute/command/api_call/service.rb,
lib/execute/command/api_call/translation_term.rb

Direct Known Subclasses

Service

Defined Under Namespace

Classes: Equal, Map, PreviousResponse, Required, Rest, Service, TranslationTerm

Instance Attribute Summary

Attributes inherited from DTK::Client::Execute::Command

#input_hash, #result_var

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DTK::Client::Execute::Command

#initialize

Constructor Details

This class inherits a constructor from DTK::Client::Execute::Command

Class Method Details

.PreviousResponse(response_key) ⇒ Object



26
27
28
# File 'lib/execute/command/api_call.rb', line 26

def self.PreviousResponse(response_key)
  PreviousResponse.new(response_key)
end

.Required(key) ⇒ Object

order matters; having these defs before requires; plus order of these requires



23
24
25
# File 'lib/execute/command/api_call.rb', line 23

def self.Required(key)
  Required.new(key)
end

Instance Method Details

#raw_executable_commands(&block) ⇒ Object

calss block where on one or more commands that achieve the api



35
36
37
38
39
40
41
42
43
# File 'lib/execute/command/api_call.rb', line 35

def raw_executable_commands(&block)
  method = required(:method).to_sym
  case required(:object_type).to_sym
   when :service
     Service.raw_executable_commands(method,&block)
   else
    raise ErrorUsage.new("The object_type '#{object_type}' is not supported")
  end
end