turkiye-identity-verification
v1.0.0
Published
Using the Nüfus ve Vatandaşlık İşleri (NVİ), it verifies the information on the Turkish Identity Card.
Downloads
25
Maintainers
Readme
Installation
This is a Node.js module available through the npm registry.
Before installing, download and install Node.js. Node.js 10.0 or higher is required.
If this is a brand new project, make sure to create a package.json
first with
the npm init
command.
Installation is done using the
npm install
command:
$ npm install turkiye-identity-verification
Example
If you use require
for importing :
const { nativeCitizenVerify, foreignCitizenVerify } = require('turkiye-identity-verification');
// If want native citizen verify
const verifyIdentityForNativeCitizen = async () => {
try {
const result = await nativeCitizenVerify(11111111111, 'Hüseyin', 'Karaoğlan', 2000);
console.log(result);
} catch (error) {
console.error(error);
}
};
verifyIdentityForNativeCitizen();
// If want foreign citizen verify
const verifyIdentityForForeignCitizen = async () => {
try {
const result = await foreignCitizenVerify(99111111111, 'Hüseyin', 'Karaoğlan', 1, 1, 2000);
console.log(result);
} catch (error) {
console.error(error);
}
};
verifyIdentityForForeignCitizen();
If you use import
for importing :
import { nativeCitizenVerify, foreignCitizenVerify } from 'turkiye-identity-verification';
// If want native citizen verify
const nativeCitizenVerifyResult = await nativeCitizenVerify(11111111111, 'Hüseyin', 'Karaoğlan', 2000);
console.log(nativeCitizenVerifyResult)
// If want foreign citizen verify
const foreignCitizenVerifyResult = await foreignCitizenVerify(99111111111, 'Hüseyin', 'Karaoğlan', 1, 1, 2000);
console.log(foreignCitizenVerifyResult);