Class: Cb::Requests::JobSearch::Get

Inherits:
Base
  • Object
show all
Defined in:
lib/cb/requests/job_search/get.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#args

Instance Method Summary collapse

Methods inherited from Base

#base_uri, #body

Constructor Details

#initialize(argument_hash, token) ⇒ Get

Returns a new instance of Get.



17
18
19
20
# File 'lib/cb/requests/job_search/get.rb', line 17

def initialize(argument_hash, token)
  super(argument_hash)
  @token = token
end

Instance Attribute Details

#tokenObject (readonly)

Returns the value of attribute token.



15
16
17
# File 'lib/cb/requests/job_search/get.rb', line 15

def token
  @token
end

Instance Method Details

#endpoint_uriObject



22
23
24
# File 'lib/cb/requests/job_search/get.rb', line 22

def endpoint_uri
  Cb.configuration.uri_job_search
end

#headersObject



30
31
32
33
34
35
# File 'lib/cb/requests/job_search/get.rb', line 30

def headers
  {
    'HostSite' => args[:host_site] || args[:HostSite] || Cb.configuration.host_site,
    'Accept' => 'application/json;version=3.0'
  }.merge(token.headers)
end

#http_methodObject



26
27
28
# File 'lib/cb/requests/job_search/get.rb', line 26

def http_method
  :get
end

#queryObject



37
38
39
# File 'lib/cb/requests/job_search/get.rb', line 37

def query
  args
end