Class: Megaplan::Search

Inherits:
Api
  • Object
show all
Defined in:
lib/megaplan/search.rb

Instance Attribute Summary

Attributes inherited from Api

#endpoint, #login, #password

Class Method Summary collapse

Methods inherited from Api

#auth_params, #auth_path, #authenticate, bad_response, card, check_response, create, #create_signature, custom_get, custom_post, delete, edit, find, #get_headers, #initial_path, #initialize, list, make_get_req, make_post_req, parsed_body, query_path, resource_path, save, to_query

Constructor Details

This class inherits a constructor from Megaplan::Api

Class Method Details

.class_endpointObject



7
8
9
# File 'lib/megaplan/search.rb', line 7

def class_endpoint
  "/BumsCommonApiV01/Search/"
end

.new(client, query = {}) ⇒ Object



11
12
13
14
15
16
# File 'lib/megaplan/search.rb', line 11

def new(client, query = {})
  path = resource_path(:get, client, 'quick.api', nil, query)
  headers = client.get_headers(:get, path.gsub('https://', ''))
  response = HTTParty.get(path, :headers => headers)
  check_response(response)
end