1.0.1 • Published 6 years ago

impassai v1.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

Entry passport identification API description Interface Overview Service Introduction Passport recognition, according to the passport image uploaded by the user, returns the completed two-dimensional code of China entry card. Explain Impassai is stored as an nodejs package on official website http://registry.npmjs.org. The third party users can install the impassai module through the NPM command. The installation commands are as follows $PROJECT indicates the user's directory of projects. #cd $PROJECT #npm install impassai If the following prompt appears, it means the installation is successful.

  • ipassai@1.0.0 Added 1 package in 1.569s Interface method Var imgocr=require ("imgocr") Imgocr. portocr ('your appid','your appkey','your secretkey','Passport filename','base 64 image') Imgocr.ipassreg ("your fullname", "your email") Sample: Var imgocr=require ('./imgocr.js') Imgocr.portocr ('1534992612943', 'JXd8iKS4EjToMEHCkLfHlDOL', 'hAfwC8MGaXqPSH8lprQWaTo1VGBgzOvL', '111.png', '/9j/4AAQSkZJRgABAQAASABIAAD/4QBYRXhpZgAAT') This method generates a two-dimensional code image called "result. png" in the current project directory, which can be used directly by users. Imgocr.ipassreg ('fullname','email.com') This method will register an access user in ipassai cloud and assign appid, appkey, secretkey. Interface method imgocr.portocr parameter specification Parameter name required type specification Appid is the only identifier for a string access project, and the accessor needs to register by calling the interface function ipassreg Appkey is the AK in the JSON returned by the string registered user interface. Secretkey is the SK in the JSON returned by the string registered user interface. Filename is the filename of the passport that the string user prepares to upload (it is recommended to call uniquevalue in share.js to generate a 32-bit random code) Filebuffer is the base64 encoding string for string users to upload their passport pictures. Interface method imgocr.ipassreg parameter specification Parameter name required type specification Fullname is the name of the registered user of string. Email is the e-mail address of string registered users.