Coder Social home page Coder Social logo

creditinfo-wrapper's Introduction

Credit Info (TZ) API Wrapper for Nodejs (still in beta)

The Unofficial Credit Info Tanzania API wrapper for Nodejs.

Installation

Install via npm (soon enough)

npm i @debugger_supreme/credintinfo

or install a particular beta version

npm install --save @debugger_supreme/[email protected]

Configuration

Authentication

Configure your api username and password in .env file as follows

CREDIT_INFO_USERNAME=your_api_username
CREDIT_INFO_PASSWORD=your_api_password

URL

The package config file comes with default API url pointing to production.

CREDIT_INFO_WSDL=https://ws.creditinfo.co.tz/WsReport/v5.39/service.svc?wsdl

To point to test environment set the CREDIT_INFO_WSDL key in your .env file to point to test url given. (See below)

CREDIT_INFO_WSDL=https://wstest.creditinfo.co.tz/WsReport/v5.39/service.svc?wsdl

Remember

  • The WSDL url should end with a ?wsdl suffix, don't forget to add this if you haven't already.
  • You need to first configure correct Authentication details above for your respective environment, as the WSDL url is secured with Basic Auth.

Usage

  1. SearchIndividual Report done
  2. Driving License Report coming soon
  3. Vehicle Report coming soon
  4. Exception Handling coming soon

SearchIndividual

Method SearchIndividualAsync(params) queries client information by FullName | PhoneNumber | IdNumber | IdNumberType

import CreditInfo from "@debugger_supreme/creditinfo";

const client = new CreditInfo({
  username: proces.env.CREDIT_INFO_USERNAME,
  password: process.env.CREDIT_INFO_PASSWORD,
  endpoint:
    "https://wstest.creditinfo.co.tz/WsReport/v5.39/service.svc?singleWSDL",
});

client
  .SearchIndividualAsync({
    query: {
      Parameters: {
        FullName: "Alli Hassan Mwinyi",
      },
    },
  })
  .then(function (results) {
    console.log({ results: results[0] });
  });

VehicleReport

Driving License Report

National Id Report

Exception Handling

TODO

  1. SearchIndividual Report
  2. Driving License Report
  3. Vehicle Report
  4. [ ]Exception Handling

This package is bootstrapped with the help of express-api-starter.

creditinfo-wrapper's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.