1.0.1 • Published 3 years ago

@iimmpact/iimmpact-api v1.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
3 years ago

iimmpact_api

IimmpactApi - JavaScript client for iimmpact_api

Installation

For Node.js

npm

npm install @iimmpact/iimmpact-api --save

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var IimmpactApi = require('@iimmpact/iimmpact-api');

var api = new IimmpactApi.AuthorizationTokenApi()

var tokenRequest = new IimmpactApi.TokenRequest(); // {TokenRequest} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.v1TokenPost(tokenRequest, callback);

Documentation for API Endpoints

All URIs are relative to https://api.iimmpact.com

ClassMethodHTTP requestDescription
IimmpactApi.AuthorizationTokenApiv1TokenPostPOST /v1/token
IimmpactApi.AuthorizationTokenApiv1TokenRefreshPostPOST /v1/token/refresh
IimmpactApi.CallbackUrlApiv1CallbackUrlGetGET /v1/callback-url
IimmpactApi.CallbackUrlApiv1CallbackUrlPostPOST /v1/callback-url
IimmpactApi.CarInsuranceApiv1CarInsuranceGetGET /v1/car-insurance
IimmpactApi.JPJRecordsApiv1JpjDrivingLicenseGetGET /v1/jpj/driving-license
IimmpactApi.JPJRecordsApiv1JpjDrivingTestResultsGetGET /v1/jpj/driving-test-results
IimmpactApi.JPJRecordsApiv1JpjMotorVehicleExpiryGetGET /v1/jpj/motor-vehicle-expiry
IimmpactApi.JPJRecordsApiv1JpjSummonsGetGET /v1/jpj/summons
IimmpactApi.LowBalanceWarningApiv1LowBalanceThresholdGetGET /v1/low-balance-threshold
IimmpactApi.LowBalanceWarningApiv1LowBalanceThresholdPostPOST /v1/low-balance-threshold
IimmpactApi.MyAccountApiv1AuthChangePasswordPostPOST /v1/auth/change-password
IimmpactApi.MyAccountApiv1AuthNewPasswordChallengePostPOST /v1/auth/new-password-challenge
IimmpactApi.MyAccountApiv1BalanceGetGET /v1/balance
IimmpactApi.ProductEnquiryApiv1ProductsGetGET /v1/products
IimmpactApi.ServicesApiv1BillPresentmentGetGET /v1/bill-presentment
IimmpactApi.ServicesApiv1NetworkstatusGetGET /v1/networkstatus
IimmpactApi.ServicesApiv1TopupPostPOST /v1/topup
IimmpactApi.TransactionHistoryApiv1BalanceStatementGetGET /v1/balance-statement
IimmpactApi.TransactionHistoryApiv1TransactionsGetGET /v1/transactions

Documentation for Models

Documentation for Authorization

IIMMPACT-COGNITO

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

SSO

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

api_key

  • Type: API key
  • API key parameter name: x-api-key
  • Location: HTTP header