Class: CouncilTaxFinder::Lookup

Inherits:
Object
  • Object
show all
Defined in:
lib/council_tax_finder/lookup.rb

Constant Summary collapse

API_ENDPOINT =
"http://app.counciltaxfinder.com/counciltaxfinder/counciltax"

Instance Method Summary collapse

Constructor Details

#initializeLookup

Returns a new instance of Lookup.



5
6
# File 'lib/council_tax_finder/lookup.rb', line 5

def initialize
end

Instance Method Details

#get(postcode:, door: nil, page: 1) ⇒ Object



8
9
10
11
12
13
# File 'lib/council_tax_finder/lookup.rb', line 8

def get(postcode:, door: nil, page: 1)
  @postcode = postcode.gsub(' ', '').downcase
  @door = door
  @page = page
  Oj.load(::Net::HTTP.get(api_endpoint))
end