1.0.0 • Published 3 years ago

postalcodes-finder v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Schools Index

License: MIT

NPM

You can use this package to get informations about any italian village.

Installation

npm i postalcodes-finder --save

Usage

Importing

const Client = require("postalcodes-finder").Client;

or

const { Client } = require("postalcodes-finder");

Available functions

Every function return an array of objects
Get all available informations for every village
const ... = await Client.getAllCodes();
Get informations by postal code
// Venice postal code: 30100
const ... = await Client.getInfoByPostalCode(code);
Get informations by city name abbreviation
// Venice city code: "VI"
const ... = await Client.getInfosByCityCode(code);
Get informations by village name
// Village name: "Venezia"
const ... = await Client.getInfosByCityCode(code);
Get informations by village city code
// Venice admin code: 20
const ... = await Client.getInfosByAdminCode(code);