https://github.com/icalialabs/sepomex-rb
A Ruby wrapper for the Sepomex API - http://sepomex.icalialabs.com/api/v1/zip_codes
https://github.com/icalialabs/sepomex-rb
ruby sdk sepomex zip-codes
Last synced: about 1 year ago
JSON representation
A Ruby wrapper for the Sepomex API - http://sepomex.icalialabs.com/api/v1/zip_codes
- Host: GitHub
- URL: https://github.com/icalialabs/sepomex-rb
- Owner: IcaliaLabs
- License: mit
- Created: 2015-07-31T17:24:28.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-12-06T15:41:16.000Z (over 8 years ago)
- Last Synced: 2025-03-25T01:51:12.612Z (over 1 year ago)
- Topics: ruby, sdk, sepomex, zip-codes
- Language: Ruby
- Homepage:
- Size: 20.5 KB
- Stars: 3
- Watchers: 6
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://codeclimate.com/github/IcaliaLabs/sepomex-rb)
[](https://codeclimate.com/github/IcaliaLabs/sepomex-rb/coverage)
[](https://codeclimate.com/github/IcaliaLabs/sepomex-rb)
# Sepomex-rb
A super simple Ruby wrapper to consume the Sepomex API at [http://sepomex-api.herokuapp.com/api/v1/zip_codes](http://sepomex-api.herokuapp.com/api/v1/zip_codes)
## Table of contents
- [Quick start](#quick-start)
- [Usage](#usage)
- [Bug tracker & feature request](#bug-tracker-&-feature-request)
- [Development](#development)
- [Contributing](#contributing)
- [Heroes](#heroes)
- [License](#license)
## Quick Start
Add this line to your application's Gemfile:
```ruby
gem 'sepomex'
```
And then execute:
```console
% bundle
```
Or install it yourself as:
```
% gem install sepomex
```
## Usage
```ruby
zip_codes = Sepomex::ZipCode.where
=> # #...
```
Filtering by State
```ruby
nuevo_leon_zipcodes = Sepomex::ZipCode.where(state: "Nuevo León")
=> #, #...
```
Filtering by Colony
```ruby
colony_zip_codes = Sepomex::ZipCode.where(colony: "Prados de la Sierra")
=>#
```
Filtering by City
``ruby
city_zip_codes = Sepomex::Zipcode.where(city: "Monterrey")
=> #...
```
## Bug tracker & feature request
Have a bug or a feature request? [Please open a new issue](https://github.com/IcaliaLabs/sepomex-rb/issues). Before opening any issue, please search for existing issues.
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, 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` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
1. Fork it ( https://github.com/[my-github-username]/sepomex/fork )
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 a new Pull Request
## Heroes
**Abraham Kuri**
+ [http://twitter.com/kurenn](http://twitter.com/kurenn)
+ [http://github.com/kurenn](http://github.com/kurenn)
+ [http://klout.com/#/kurenn](http://klout.com/#/kurenn)
**Oscar Elizondo**
+ [http://twitter.com/oehinojosa](http://twitter.com/oehinojosa)
+ [http://github.com/oelizondo](http://github.com/oelizondo)
## Copyright and license
Code and documentation copyright 2015 Icalia Labs. Code released under [the MIT license](LICENSE).