Class: CouncilTaxFinder::Lookup
- Inherits:
-
Object
- Object
- CouncilTaxFinder::Lookup
- Defined in:
- lib/council_tax_finder/lookup.rb
Constant Summary collapse
- API_ENDPOINT =
"http://app.counciltaxfinder.com/counciltaxfinder/counciltax"
Instance Method Summary collapse
- #get(postcode:, door: nil, page: 1) ⇒ Object
-
#initialize ⇒ Lookup
constructor
A new instance of Lookup.
Constructor Details
#initialize ⇒ Lookup
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 |