Module: Gurunavi::Rests

Included in:
Client
Defined in:
lib/gurunavi/rests.rb

Instance Method Summary collapse

Instance Method Details

#foreign_rest_search(options = {}) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/gurunavi/rests.rb', line 16

def foreign_rest_search(options={})
  response = connection.get do |req|
    req.url "ForeignRestSearchAPI/#{@api_version}", options
  end
  response_body = return_error_or_body(response, response.body.rest)
  convert_to_array_if_needed(response_body)
end

#rest_search(options = {}) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/gurunavi/rests.rb', line 7

def rest_search(options={})
  response = connection.get do |req|
    req.url "RestSearchAPI/#{@api_version}", options
  end
  response_body = return_error_or_body(response, response.body.rest)
  convert_to_array_if_needed(response_body)
end