postie
Get Version
1.0.2What
Postie is a very simple interface for auspostie.com, which is an API for Australian Suburb/Postcode data. It provides a class for searching the service, as well as a CLI tool that does the job as well.
Installing
sudo gem install postie
Usage
For the CLI tool:
postie Melbourneor
postie 3056
Or, within code:
require 'postie' Postie::Locality.find("Wentworth")
A call to Locality#find (with either a suburb or postcode) returns an array of Locality objects, with attributes suburb, postcode, state and comments. Just like auspostie.com, if you enter a suburb, it’ll use a partial search (so ‘Melbourne’ will return ‘North Melbourne’), but when using a postcode, the search is exact.
License
This code is free to use under the terms of the MIT license.
Contact
Comments, suggestions and patches are welcome. Send an email to pat at freelancing-gods dot com.
Pat Allan, 1st January 2008
Theme extended from Paul Battley