builder/extra/cluster-home/lib/ruby/tungsten/api.rb
def call (service, name , type=nil, api_server=nil)
        api_server ||= @api_server
        api = @api_calls[name]
        unless api
            raise SyntaxError, "api call #{name} not found"
        end
        if type == nil
          type = api.type
        end
        
        if type == :get
            return api.get(@api_server,service)
        else
            return api.post(@api_server,service)
        end
    end
#
# Calls a named service with explicit mode (:get or :post)
#
Calls a named service with explicit mode (:get or :post)
Calls a named service with explicit mode ( : get or : post )
def call (service, name , type=nil, api_server=nil)
        api_server ||= @api_server
        api = @api_calls[name]
        unless api
            raise SyntaxError, "api call #{name} not found"
        end
        if type == nil
          type = api.type
        end
        if type == :get
            return api.get(@api_server,service)
        else
            return api.post(@api_server,service)
        end
    end
def call ( service , name , type = nil , api_server = nil ) api_server ||= @api_server api = @api_calls [ name ] unless api raise SyntaxError , "api call #{name} not found" end if type == nil type = api . type end if type == :get return api . get ( @api_server , service ) else return api . post ( @api_server , service ) end end
Calls a named service with explicit mode (:get or :post)
Calls a named service with explicit mode ( : get or : post )
service
name
type
api_server