1.0.8 • Published 5 months ago

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

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months 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

5 months ago

1.0.7

6 months ago

1.0.6

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago