1.0.2 • Published 1 year ago

coreapi-tech v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Description

This npm package provides a set of tools for interacting with the CoreAPI service, allowing you to obtain various information related to account, geo, email, phone, and SMS authentication.

Installation

You can install this package using npm by running the following command:

npm i coreapi-tech

Usage

To use this package, first import the Tools class from the coreapi-tools module:

const { Tools } = require('coreapi-tools');

Then, create an instance of the Tools class by passing in your CoreAPI token:

const tools = new Tools('your-token-goes-here');

Available Methods

get_user_geo(ip, scope)

Returns geographic information about the user associated with the provided IP address, with the option to limit the scope of information returned. The default scope is 'all'.

const geoInfo = await tools.get_user_geo('192.0.2.1', ['country', 'region']);
console.log(geoInfo);
get_email_info(email)

Returns information about the provided email address, including whether it is valid, disposable, or a known spam source.

const emailInfo = await tools.get_email_info('example@email.com');
console.log(emailInfo);
send_sms_auth(phone, code, language)

Sends an SMS authentication code to the provided phone number, using the specified code and language.

const smsInfo = await tools.send_sms_auth('+1234567890', '123456', 'en');
console.log(smsInfo);
get_phone_info(phone)

Returns information about the provided phone number, including whether it is valid, the country and carrier associated with it, and more.

const phoneInfo = await tools.get_phone_info('+1234567890');
console.log(phoneInfo);

License

This package is licensed under the MIT License. See the LICENSE file for details.

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago