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

idfy

v1.2.0

Published

Node module for integration with IDfy-API.

Downloads

16

Readme

IDFY NodeJS CLient

NodeJS WEB SDK - Node module for integration with IDfy-API.

Util to request IDfy's Extraction and Verification Engine services.

Installation


Client-Initiation

Syntax :
var client = new Client(apikey, account_id)
Example :
var client = new Client("77484e44-db92-4a64-9584-0cc1798cd555", "e53992c5-6d6f-4d85-bc36-07f7442f91bc");

Please ensure the API_KEY and ACCOUNT_ID are included as a string.

Usage

POST request
  • Making API call to make service request.(Refer various services (or) task_types here - https://api-docs.idfy.com/v2/#task-types).
Syntax :
var input_data = {
    request_id: "<REQUEST_ID>",
    task_id: "<TASK_ID>",
    group_id: "<GROUP_ID>"
    data: {
        key1: "<VALUE>",
        key2: "<VALUE>"
    }
}
var response = client.post_request(input_data, callback)
  • Mandatory arguments: In input_data (dictionary), task_type (string), task_id (string), data (dictionary), callback (function)
  • Optional arguments: group_id (string)
  • Ensure the task_type is exactly mentioned as found in the doc.
  • Strictly stick to the request-schema respective to the task_types mentioned in the doc.
  • request_id in the response body is a unique-id, which will be used to query the response of the api-call.
  • Response to the above API-request:
{
  "status": 202, 
  "request_id": "e53992c5-6d6f-4d85-bc36-07f7442f91bc"
}
GET response
  • Making API call, to receive response from the request made in the above step. request_id - generated in the previous step, will be an argument to get the response.
Syntax :
var input_data = {
    request_id: "<REQUEST_ID>",
    task_id: "<TASK_ID>",
    group_id: "<GROUP_ID>",

}
var ans = client.get_response(input_data,callback);
  • Mandatory argument(s) - input_data (request_id (string)), callback (function).
  • Response from the above the API-call:
[
    {
        "status": "completed",
        "request_id": "e53992c5-6d6f-4d85-bc36-07f7442f91bc",
        "task_id": "4d48c187-53e5-4b6e-947a-04655eed588b",
        "group_id": "d468f87e-8e7b-4422-83eb-2edf4c1cfb95",
        "created_at": "2018-09-03T08:12:57+00:00",
        "completed_at": "2018-09-03T08:13:07+00:00",
        "tat": "10.081501662",
        "ocr_output": {
            "pan_number": "BJAPS7****",
            "pan_type": "Individual",
            "name_on_card": "Sr*****",
            "fathers_name": "Ven*******",
            "date_on_card": "1984-04-07",
            "date_of_issue": "2006-12-27",
            "age": 34,
            "is_scanned": false,
            "minor": false,
            "raw_text": "INCOME TAX DEPARTMENT\nGOVT OF INDIA\nSRXXXXXXX G V\nVEN********\n07/04/1984\nPermanent Account Number\nBJAPSXXXX\nSignature\n"
        }
    }
]