Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nicka/dcentralized
API wrapper for Pro6PP zipcode database(d-centralize.nl).
https://github.com/nicka/dcentralized
Last synced: 5 days ago
JSON representation
API wrapper for Pro6PP zipcode database(d-centralize.nl).
- Host: GitHub
- URL: https://github.com/nicka/dcentralized
- Owner: nicka
- License: mit
- Created: 2013-04-17T20:53:42.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-09-25T08:59:31.000Z (about 11 years ago)
- Last Synced: 2024-10-27T05:43:04.929Z (18 days ago)
- Language: Ruby
- Homepage:
- Size: 220 KB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/nicka/dcentralized.png?branch=develop)](https://travis-ci.org/nicka/dcentralized) [![Code Climate](https://codeclimate.com/github/nicka/dcentralized.png)](https://codeclimate.com/github/nicka/dcentralized) [![Gem Version](https://badge.fury.io/rb/dcentralized.png)](http://badge.fury.io/rb/dcentralized)
# Dcentralized
API wrapper for Pro6PP zipcode database(d-centralize.nl).
## Installation
Add this line to your application's Gemfile:
gem 'dcentralized'
And then execute:
$ bundle
Or install it yourself as:
$ gem install dcentralized
## Setup
Add file `config/initializers/dcentralized.rb`.
require 'dcentralized'
Dcentralized.configure do |config|
config.api_key = "123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ"
end## Example usage
High detailed zipcode result:
response = Dcentralized.auto_complete("2564AZ")
# => #Low detailed zipcode result:
response = Dcentralized.auto_complete("2564")
# => #You can then use:
response.street
# => "Laan van Meerdervoort"
response.province
# => "Zuid-Holland"## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request