lagoinha 0.1.0

Lagoinha is a package that uses public APIs to fetch addresses using the Brazilian Postal Code (CEP). This package cuncurrenlty calls all the supported APIs and returns the first result.
Documentation

lagoinha-rs

Rust project inspired by https://github.com/IgorHalfeld/lagoinha used to retrieve Addresses from the Brazilian Postal Code (CEP)

❌ - This project is in the first stages of development, and should not be used in production.

✔️ - Contributions and reviews are appreciated !



Lagoinha is a package that uses public APIs to fetch addresses using the Brazilian Postal Code (CEP). This package cuncurrenlty calls all the supported APIs and returns the first result.

Diagram:

lagoinha call fluxogram

Why this name ?

It means "little pond". It is a Brazillian meme ! Check the videovídeo!

Instalation

lagoinha-rs = "0.1"

How to use it

extern crate lagoinha;
extern crate tokio;

#[tokio::main]
async fn main() {    
    let addr = lagoinha::get_address("CEP_GOES_HERE").await;
    println!("{:#?}", addr);
}

Run Examples

Check the examples folder ! To run them, use the commands below.

# these examples can be run with a specific CEP (or leave blank for default value)
cargo run --example get_address 20940040
cargo run --example standalone_services 20940040


Todo

  • Get Started
  • Viacep service
  • Correios service
  • CepLá service
  • Separate Two languages in README.md
  • Documentation
  • Invest in better error handling
  • Unhappy path testing
  • Validate input
  • Different compilation features