Skip to content

RedCarpetUp/redcarpet-js-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Redcarpet SDK

Installation

npm i rc_sdk_gm
yarn add rc_sdk_gm

Documentation

Documentation of Redcarpet API and their usage

Basic Usage

Instantiate the redcarpet instance with apiKey , productType & productVersion. You can obtain the keys from the redcarpet website.

const RedcarpetUpAPI = require('rc_sdk_gm');

var instance = new RedcarpetUpAPI({
    productType: "your-product-type",
    apiKey: "your-api-key",
});

The resources can be accessed via the instance. All the methods invocations follows the namespaced signature

// API signature
// {redcarpt Instance}.{methodName}

// example
instance.getOtp({
    phone:'XXXXXXXXXX'
});

Every resource method returns a promise.

instance.verifyOtp({
    phone: 'XXXXXXXXXX',
    otp: '234343',
  })
  .then(response => {
    // handle success
  })
  .catch(error => {
    // handle error
  });

Licence

MIT Licensed. See LICENSE.txt for more details

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •