An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

[![Code Climate](https://codeclimate.com/github/IcaliaLabs/sepomex-rb/badges/gpa.svg)](https://codeclimate.com/github/IcaliaLabs/sepomex-rb)
[![Test Coverage](https://codeclimate.com/github/IcaliaLabs/sepomex-rb/badges/coverage.svg)](https://codeclimate.com/github/IcaliaLabs/sepomex-rb/coverage)
[![Issue Count](https://codeclimate.com/github/IcaliaLabs/sepomex-rb/badges/issue_count.svg)](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).