easyplace

1.0.2 • Public • Published

EasyPlace

This project provides an API to search for places such as streets, neighborhoods, cities and so on. It's made upon the ViaCEP project of IBGE.

Uses

const findAddresssUsingCep = async (cep) => {
    try {
        const address = await EasyPlace.getAddressOfCep(cep);
        console.log(address);
    } catch (e) {
        console.log(e.message);
    }
}

findAddresssUsingCep("57055800");


const getPlaces = async (wordsInStreetName, city, state, neighborhood) => {
    try {
        const places = await EasyPlace.searchStreetWithName(wordsInStreetName)
                                      .inCity(city)
                                      .inState(state)
                                      .inNeighborhood(neighborhood)
                                      .search();
        console.log(places);
    } catch (e) {
        console.log(e);
    }
}

getPlaces(["arroxelas"], "Maceio", "AL", "Ponta Verde");

Bugs

  • No one yet :)

Contribuitors

  • Aurelio Buarque (https://github.com/ABuarque)

Readme

Keywords

Package Sidebar

Install

npm i easyplace

Weekly Downloads

5

Version

1.0.2

License

ISC

Unpacked Size

7.59 kB

Total Files

9

Last publish

Collaborators

  • abuarquemf