@seedz-d2f/seedz-farm-core
TypeScript icon, indicating that this package has built-in type declarations

1.0.8 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @seedz-d2f/seedz-farm-core

Weekly Downloads

2

Version

1.0.8

License

MIT

Unpacked Size

33.5 kB

Total Files

83

Last publish

Collaborators

  • raphaelmeloseedz
  • joseafs-seedz
  • ivan_seedz