{"id":24387163,"url":"https://github.com/icalialabs/sepomex-rb","last_synced_at":"2025-04-11T03:51:36.614Z","repository":{"id":35737808,"uuid":"40016548","full_name":"IcaliaLabs/sepomex-rb","owner":"IcaliaLabs","description":"A Ruby wrapper for the Sepomex API - http://sepomex.icalialabs.com/api/v1/zip_codes","archived":false,"fork":false,"pushed_at":"2017-12-06T15:41:16.000Z","size":21,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-25T01:51:12.612Z","etag":null,"topics":["ruby","sdk","sepomex","zip-codes"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IcaliaLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-31T17:24:28.000Z","updated_at":"2017-03-21T20:18:46.000Z","dependencies_parsed_at":"2022-08-18T06:29:04.831Z","dependency_job_id":null,"html_url":"https://github.com/IcaliaLabs/sepomex-rb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IcaliaLabs%2Fsepomex-rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IcaliaLabs%2Fsepomex-rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IcaliaLabs%2Fsepomex-rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IcaliaLabs%2Fsepomex-rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IcaliaLabs","download_url":"https://codeload.github.com/IcaliaLabs/sepomex-rb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339262,"owners_count":21087214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ruby","sdk","sepomex","zip-codes"],"created_at":"2025-01-19T12:22:11.391Z","updated_at":"2025-04-11T03:51:36.593Z","avatar_url":"https://github.com/IcaliaLabs.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Code Climate](https://codeclimate.com/github/IcaliaLabs/sepomex-rb/badges/gpa.svg)](https://codeclimate.com/github/IcaliaLabs/sepomex-rb)\n[![Test Coverage](https://codeclimate.com/github/IcaliaLabs/sepomex-rb/badges/coverage.svg)](https://codeclimate.com/github/IcaliaLabs/sepomex-rb/coverage)\n[![Issue Count](https://codeclimate.com/github/IcaliaLabs/sepomex-rb/badges/issue_count.svg)](https://codeclimate.com/github/IcaliaLabs/sepomex-rb)\n\n# Sepomex-rb\n\nA 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)\n\n## Table of contents\n- [Quick start](#quick-start)\n- [Usage](#usage)\n- [Bug tracker \u0026 feature request](#bug-tracker-\u0026-feature-request) \n- [Development](#development)\n- [Contributing](#contributing)\n- [Heroes](#heroes)\n- [License](#license)\n\n## Quick Start\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'sepomex'\n```\n\nAnd then execute:\n\n```console\n% bundle\n```\n\nOr install it yourself as:\n\n```\n% gem install sepomex\n```\n\n## Usage\n\n```ruby\nzip_codes = Sepomex::ZipCode.where\n\n=\u003e #\u003cSepomex::ZipCode id=53, d_codigo=\"01184\", d_asenta=\"Nelli Campo Bello\", d_tipo_asenta=\"Unidad habi...\n```\n\nYou can specify the page to request as an option on the method.\n\n```ruby\nzip_codes = Sepomex::ZipCode.where(page: 2)\n\n=\u003e #\u003cSepomex::ZipCode id=53, d_codigo=\"01184\", d_asenta=\"Nelli Campo Bello\", d_tipo_asenta=\"Unidad habi...\n```\n\nYou can also filter by code:\n\n```ruby\nzip_codes = Sepomex::ZipCode.where(page: 2, cp: \"67173\")\n\n=\u003e #\u003cSepomex::Collection:0x007fcb9bab50e0 @total_pages=1, @total_objects=8, @per_page=50, @collection=[#\u003cSepomex::ZipCode id=89510, d_codigo=\"67173\", d_asenta=\"Contry los Nogales\", d_tipo_asenta=\"Colonia\", d_mnpio=\"Guadalupe\", d_estado=\"Nuevo León\", d_ciudad=\"Guadalupe\", d_cp=\"67171\", c_estado=\"19\", c_oficina=\"67171\", c_cp=\"\", c_tipo_asenta=\"09\", c_mnpio=\"026\", id_asenta_cpcons=\"1725\", d_zona=\"Urbano\", c_cve_ciudad=\"04\"\u003e...\n```\n\nFiltering by State\n\n```ruby\nnuevo_leon_zipcodes = Sepomex::ZipCode.where(state: \"Nuevo León\")\n\n=\u003e #\u003cSepomex::ZipCode id=85801, d_codigo=\"64000\", d_asenta=\"La Finca\", d_tipo_asenta=\"Colonia\", d_mnpio=\"Monterrey\", d_estado=\"Nuevo León\", d_ciudad=\"Monterrey\", d_cp=\"64008\", c_estado=\"19\", c_oficina=\"64008\", c_cp=\"\", c_tipo_asenta=\"09\", c_mnpio=\"039\", id_asenta_cpcons=\"3429\", d_zona=\"Urbano\", c_cve_ciudad=\"07\"\u003e, #\u003cSepomex::ZipCode id=85802, d_codigo=\"64000\", d_asenta=\"Monterrey Centro\", d_tipo_asenta=\"Colonia\", d_mnpio=\"Monterrey\", d_estado=\"Nuevo León\", d_ciudad=\"Monterrey\", d_cp=\"64008\", c_estado=\"19\", c_oficina=\"64008\", c_cp=\"\", c_tipo_asenta=\"09\", c_mnpio=\"039\", id_asenta_cpcons=\"0001\", d_zona=\"Urbano\", c_cve_ciudad=\"07\"\u003e...\n```\n\nFiltering by Colony\n\n```ruby\n\ncolony_zip_codes = Sepomex::ZipCode.where(colony: \"Prados de la Sierra\")\n\n=\u003e#\u003cSepomex::ZipCode id=87890, d_codigo=\"66230\", d_asenta=\"Prados de La Sierra\", d_tipo_asenta=\"Colonia\", d_mnpio=\"San Pedro Garza García\", d_estado=\"Nuevo León\", d_ciudad=\"San Pedro Garza García\", d_cp=\"66231\", c_estado=\"19\", c_oficina=\"66231\", c_cp=\"\", c_tipo_asenta=\"09\", c_mnpio=\"019\", id_asenta_cpcons=\"0887\", d_zona=\"Urbano\", c_cve_ciudad=\"02\"\u003e\n```\n\nFiltering by City\n\n``ruby\n\ncity_zip_codes = Sepomex::Zipcode.where(city: \"Monterrey\")\n\n=\u003e #\u003cSepomex::ZipCode id=85801, d_codigo=\"64000\", d_asenta=\"La Finca\", d_tipo_asenta=\"Colonia\", d_mnpio=\"Monterrey\", d_estado=\"Nuevo León\", d_ciudad=\"Monterrey\", d_cp=\"64008\", c_estado=\"19\", c_oficina=\"64008\", c_cp=\"\", c_tipo_asenta=\"09\", c_mnpio=\"039\", id_asenta_cpcons=\"3429\", d_zona=\"Urbano\", c_cve_ciudad=\"07\"\u003e...\n```\n\n## Bug tracker \u0026 feature request\n\nHave 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.\n\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo 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).\n\n## Contributing\n\n1. Fork it ( https://github.com/[my-github-username]/sepomex/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Heroes\n\n**Abraham Kuri**\n\n+ [http://twitter.com/kurenn](http://twitter.com/kurenn)\n+ [http://github.com/kurenn](http://github.com/kurenn)\n+ [http://klout.com/#/kurenn](http://klout.com/#/kurenn)\n\n**Oscar Elizondo**\n\n+ [http://twitter.com/oehinojosa](http://twitter.com/oehinojosa)\n+ [http://github.com/oelizondo](http://github.com/oelizondo)\n\n\n## Copyright and license\n\nCode and documentation copyright 2015 Icalia Labs. Code released under [the MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficalialabs%2Fsepomex-rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficalialabs%2Fsepomex-rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficalialabs%2Fsepomex-rb/lists"}