APM Pricefinder Ruby Library
This library providers a thin layer for the APM Pricefinder API from applications written in the Ruby language.
Find out more about Pricefinder at https://www.pricefinder.com.au
API Documentation is available here https://api.pricefinder.com.au/v1/swagger
Installation
Add this line to your application's Gemfile:
gem 'pricefinder'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install pricefinder
Usage
Initialize Client
pricefinder = Pricefinder::Client.new({ client_id: 'USERNAME', client_secret: 'PASSWORD' })
Making a Query
Currently only GET requests are supported.
result = pricefinder.get(path, params)
Example Query
result = pricefinder.get('suggest/properties', { q: '4/16 Clarke St' })
# => {"matches"=>[{"property"=>{"id"=>6578963, "location"=>{"lat"=>-33.7236573573369, "lon"=>151.297135301613}, "parent"=>false, "_self"=>"https://api.pricefinder.com.au/v1/properties/6578963"}, "street"=>{"id"=>"NSW2834900"}, "suburb"=>{"id"=>"NSW2927", "_self"=>"https://api.pricefinder.com.au/v1/suburbs/NSW2927"}, "type"=>"property", "display"=>"4/16 CLARKE ST, NARRABEEN, NSW 2101", "legalDescription"=>"4//SP6548", "address"=>{"street"=>"CLARKE STREET", "unit"=>"4", "streetNumber"=>"16", "streetAddress"=>"4/16 CLARKE STREET", "locality"=>"NARRABEEN", "streetLocation"=>"4/16", "state"=>"NSW", "postcode"=>"2101", "countryCode"=>"AU", "lga"=>"NORTHERN BEACHES COUNCIL"}, "alternativeAddresses"=>[{"street"=>"CLARKE STREET", "unit"=>"4", "streetNumber"=>"16", "streetAddress"=>"4/16 CLARKE STREET", "locality"=>"NARRABEEN", "streetLocation"=>"4/16", "state"=>"NSW", "postcode"=>"2101", "countryCode"=>"AU", "lga"=>"NORTHERN BEACHES COUNCIL"}]}], "disclaimer"=>"© Property Data Solutions Pty Ltd 2017. The materials presented on this site are distributed as an information source only. The information recorded in this document is provided on the basis that readers will be responsible for making their own assessment of the information and are advised to verify all relevant representations, statements and information. Note: Pricefinder estimates provided via this site have been generated by use of proprietary computer software. Pricefinder estimates are NOT valuations and should not be used in lieu of a professional valuation. Users are advised to engage the services of a registered valuer in order to receive a comprehensive valuation. All data and information relating to local schools is provided by domain.com.au as a courtesy only. Users should check directly with the local schools to verify this data and/or information.No liability (in contract, tort or otherwise) will be accepted for any loss or damage incurred as a result of reliance upon any material contained in this publication, or for any information or advice provided in this publication or incorporated into it."}
Development
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/realhub/pricefinder-ruby
License
The gem is available as open source under the terms of the MIT License.