Class: PacerApi::Immediate::PartySearch

Inherits:
Object
  • Object
show all
Defined in:
lib/pacer_api/immediate/party_search.rb

Defined Under Namespace

Classes: Page

Constant Summary collapse

PATH =
"parties/find?page=%d"

Instance Method Summary collapse

Constructor Details

#initialize(session, params) ⇒ PartySearch

Returns a new instance of PartySearch.



11
12
13
14
# File 'lib/pacer_api/immediate/party_search.rb', line 11

def initialize(session, params)
  @session = session
  @params = params
end

Instance Method Details

#fetch(page = 0) ⇒ Object



16
17
18
19
20
# File 'lib/pacer_api/immediate/party_search.rb', line 16

def fetch(page = 0)
  path = format(PATH, page)
  payload = @session.post(path, @params)
  Page.new(payload)
end