npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

data-fornix-web-api

v0.0.7

Published

Data Fornix Web API SDK

Downloads

12

Readme

Data-Fornix-Web API SDK

This Data-Fornix-Web API SDK provides a set of method's for JavaScript applications to verify user, capture and save data.

Getting Started

1. Obtaining an API token

In order to start integration, you will need the API token.

2. Including/Importing the library

2.1 HTML Script Tag Include

Include it as a regular script tag on your page:

<script src='dist/data-fornix-web-api.js'></script>

2.2 NPM style import

You can also import it as a module into your own JS build system (tested with Webpack).

$ npm install --save data-fornix-web-api
// ES6 module import
import DataFornixApi from 'data-fornix-web-api'

// commonjs style require
var DataFornixApi = require('data-fornix-web-api')

3. initializing the SDK

You are now ready to initialize the SDK:

// Create instance of DataFornix Web API SDK
// and store it in `dataFornixAPIInstance` for future use
const dataFornixAPIInstance = new DataFornixApi({
        apiToken: <Your API TOKEN HERE>,
        baseUrl: <Your Server Base Url>
    });

To verify that SDK is successfully initialized or not, you can pass callback function as second parameter

const dataFornixAPIInstance = new DataFornixApi(
    {
        apiToken: <Your API TOKEN HERE>,
        baseUrl: <Your Server Base Url>
    },
    function (response) {
        console.log('api sdk ready to use', response);
    }
);

4. Create User

You also need to create user after SDK initialize and before any other sdk method call.

Call createUser method

// dummy user object
const userData = {
    "email":"VALID_USER",
    "name":"USER_NAME",
    "phone_number":"USER_PHONE",
    "country_code":"USER_COUNTRY_CODE"
}

const createUserRes = dataFornixAPIInstance.createUser(userData);
// Return promise object
createUserRes.then(function (success) {
    // call SDK other methods here
    console.log('Call SDK other methods here')
}, function (error) {
    console.log('Error in create use => ', error);
});

Parameters

Following parameters are using to initialize API SDK:

  • apiToken {String} required

    A API Token is required in order to authorise. If one isn’t present, an exception will be thrown.

  • callback {Function} optional

    Callback function that fires when the Api SDk successfully initialized.

Documentation for API Endpoints

Method | Description ------------- | ------------- | createUser | This method is for get user details from database before other api call. createUserToken | This method is for generate unique token for user and return saved details from database. documentDataCapture | This method is for capture data from provided documents. documentDataSave | This method is for save captured document into database. checkVideo | Responsiable for store and verify user video. SelfieVerify | Responsiable for store and verify user selfie image. getAssets | This method is responsiable for send all assets list. deleteAsset | This method is responsiable for delete asset. getSharedAssets | This method is responsiable for send all user shared assets list. organisationAssetRequest | Responsiable for send list of organisation request for assets. organisationAllAssetRequest | Responsiable for send list of organisation request for all assets. updateAssetDetails | Responsiable for update asset data and store. uploadAssetRequest | Responsiable for send list of upload asset request. generateSelfieToken | Responsiable for get selfie token. selfieVerifyWithToken | Responsiable for send selfie using unique token. getSelfieResult | Responsiable for get selfie match status with other asset.

Documentation for Method