Brazilian zipcode lookup (CEP) library for Elixir.
The package can be installed by adding cepex
to your list of dependencies in mix.exs
:
def deps do
[
{:cepex, "~> 0.1.0"}
]
end
# => Rock on! 🚀
# With formatted zipcode strings :)
iex> Cepex.lookup("80010-180")
{:ok, %Cepex.Address{
address: "Rua Barão do Rio Branco",
cep: "80010180",
city: "Curitiba",
complement: "",
http_response: %Cepex.HTTP.Response{},
neighborhood: "Centro",
state: "PR"
}}
# With zipcode integers :)
iex> Cepex.lookup(80010180)
{:ok, %Cepex.Address{
address: "Rua Barão do Rio Branco",
cep: "80010180",
city: "Curitiba",
complement: "",
http_response: %Cepex.HTTP.Response{},
neighborhood: "Centro",
state: "PR"
}}
# With unformatted zipcode strings :)
iex> Cepex.lookup("80210130")
{:ok, %Cepex.Address{
address: "Rua Barão do Rio Branco",
cep: "80010180",
city: "Curitiba",
complement: "",
http_response: %Cepex.HTTP.Response{},
neighborhood: "Centro",
state: "PR"
}}
The full documentation is available on Hex.
- Create a fork (https://github.com/vnbrs/cep.ex/fork)
- Create a branch (git checkout -b my-new-feature)
- Make a commit (git commit -am 'Add some feature')
- Push your code (git push origin my-new-feature)
- Create a Pull Request
- Thanks! 🤙