postmon_ruby permite consultar cep's através da api do postmon
Add this line to your application's Gemfile:
gem 'postmon_ruby'
And then execute:
$ bundle
Or install it yourself as:
$ gem install postmon_ruby
####Consultar CEP:
require'postmon_ruby'resultado=PostmonRuby::Client.search:cep,"01330000"putsresultado.logradouroputsresultado.bairroputsresultado.cidadeputsresultado.estado####Consultar informações de uma cidade:
require'postmon_ruby'resultado=PostmonRuby::Client.search:cidade,"SP","Araraquara"putsresultado.area_km2putsresultado.codigo_ibge####Consultar informações de um estado:
require'postmon_ruby'resultado=PostmonRuby::Client.search:estado,"SP"putsresultado.area_km2putsresultado.codigo_ibgeputsresultado.nome###Para consultar pelo terminal A comand-line-interface para consultar ceps, informações do IBGE e rastreio de pacotes diretamente do terminal foi separada em outro projeto. PostmonCLI(https://github.com/PostmonAPI/postmon-cli)
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request