1.0.8 • Published 2 years ago

@seedz-d2f/seedz-farm-core v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

SEEDZ FARM CORE

A simple library to search for the city's CEP with coordinates and IBGE Code by CEP.

Install

Install the library using yarn:

yarn add @seedz-d2f/seedz-farm-core

How to use

Import the City Service instance into your code:

const { cityService } = require('@seedz-d2f/seedz-farm-core');

Set Token default to Google Maps

const token = 'your_google_key_api';

cityService.setGoogleMapsToken(token);

Search Zip Code by Coordinates:

const coordinates = { lat: '123.456', long: '-789.012' };

const { zipCode } = await cityService.getZipCodeByCoordinates(coordinates); // { zipCode: '00000-000' }
console.log('CEP:', zipCode); //'00000-000'

Search Ibge Code by Zip Code:

const zipCode = '12345-678';

const { ibgeCode } = await cityService.getIbgeCodeByZipCode(zipCode); // { ibgeCode: '9876543' }
console.log('IBGE Code:', ibgeCode); // '9876543'

Contribution

If you want to contribute to this project, feel free to open issues or pull requests.

LICENSE

This project is licensed under the MIT License - see the LICENSE file for details.

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago