0.0.5 • Published 3 years ago

roqqupay-nodejs v0.0.5

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

roqqupay-nodejs

A library for integrating roqqupay apis using nodejs

#installation You can install the package via npm :

npm install roqqupay-nodejs

#Usage

   //Get all token prices
   const RoqquPay = require('roqqupay-nodejs');
   (async function(){
   const RoqquPayClass = new RoqquPay();
   const priceInfo = await RoqquPayClass.prices.getPrices();
   console.log(priceInfo);
 })();
   //Get a specific token price
   const RoqquPay = require('roqqupay-nodejs');
   (async function(){
       const RoqquPayClass = new RoqquPay();
       //This is the token symbol of the token you intend to retrieve data for
       const token = 'btc';
       const priceInfo = await RoqquPayClass.prices.getPrice(token);
       console.log(priceInfo);
 })();
   //Get price history
   const RoqquPay = require('roqqupay-nodejs');
  (async function(){
       const RoqquPayClass = new RoqquPay();
       //This is the token symbol of the token you intend to retrieve data for
      const token = 'btc';
       const priceHistory = await RoqquPayClass.prices.getPriceHistory(token);
       console.log(priceHistory);
 })();
   //Get wallet data
   const RoqquPay = require('roqqupay-nodejs');
  (async function(){
       const RoqquPayClass = new RoqquPay();
       //this is the token for the wallet address you want to retrieve data for
        const token = 'btc';
       //this is the wallet address you want to retrieved data for
       const walletAddress = 'wallet address'
      const addressData = await RoqquPayClass.wallet.getWalletData(token, walletAddress);
      console.log(addressData);
 })();
   //Generate wallet address
   const RoqquPay = require('roqqupay-nodejs');
  (async function(){
       //your roqqu secret key
       const secretKey = 'Bearer RQ-SEC-XXXXXXXXX';
       const RoqquPayClass = new RoqquPay(secretKey);
      //this is the token for the wallet address you want to generate
       const token = 'btc';
       const addressData = await RoqquPayClass.wallet.generateWalletAddress(token);
       console.log(addressData);
 })();
   //Get wallet addresses
   const RoqquPay = require('roqqupay-nodejs');
  (async function(){
       //your roqqu secret key
       const secretKey = 'Bearer RQ-SEC-XXXXXXXXX';
       const RoqquPayClass = new RoqquPay(secretKey);
      //this is the token for the wallet address you want to generate
       const token = 'btc';
       const walletAddresses = await RoqquPayClass.wallet.getWalletAddresses(token);
       console.log(walletAddresses);
 })();
   //Get wallet addresses
   const RoqquPay = require('roqqupay-nodejs');
  (async function(){
       //your roqqu secret key
       const secretKey = 'Bearer RQ-SEC-XXXXXXXXX';
       const RoqquPayClass = new RoqquPay(secretKey);
      //this is the token for the wallet address you want to generate
       const token = 'btc';
       const walletAddresses = await RoqquPayClass.wallet.getWalletAddresses(token);
       console.log(walletAddresses);
 })();
   //delete wallet addresses
   const RoqquPay = require('roqqupay-nodejs');
  (async function(){
       //your roqqu secret key
       const secretKey = 'Bearer RQ-SEC-XXXXXXXXX';
       const RoqquPayClass = new RoqquPay(secretKey);
      //this is the token for the wallet address you want to generate
       const token = 'btc';
       const walletAddress = 'wallet address you want to delete'
       const deleteWalletAddress = await RoqquPayClass.wallet.deleteWalletAddress(token, walletAddress);
       console.log(deleteWalletAddress);
 })();
   //get data bundles
   const RoqquPay = require('roqqupay-nodejs');
  (async function(){
       const RoqquPayClass = new RoqquPay();
       const provider = 'mtn';
       const dataBundles = await RoqquPayClass.vtu.getDataBundes(provider);
       console.log(dataBundles);
 })();
   //recharge airtime
   const RoqquPay = require('roqqupay-nodejs');
  (async function(){
      //your roqqu secret key
      const secretKey = 'Bearer RQ-SEC-XXXXXXXXX';
      const RoqquPayClass = new RoqquPay(secretKey);
      const phoneNumber = 'phone number you want to recharge';
      const amount = 'amount you want to recharge'
      const rechargeAirtime = await RoqquPayClass.vtu.rechargeAirtime(phoneNumber, amount);
      console.log(rechargeAirtime);
 })();
   //get data bundles
   const RoqquPay = require('roqqupay-nodejs');
  (async function(){
       const RoqquPayClass = new RoqquPay();
       const provider = 'mtn';
       const dataBundles = await RoqquPayClass.vtu.getDataBundes(provider);
       console.log(dataBundles);
 })();
   //get cable bundles
   const RoqquPay = require('roqqupay-nodejs');
  (async function(){
      //your roqqu secret key
       const secretKey = 'Bearer RQ-SEC-XXXXXXXXX';
       const RoqquPayClass = new RoqquPay(secretKey);
       //This is the provider of the cable, dstv, gotv and startimes currently enabled
       const provider = 'dstv';
       const cableBundles = await RoqquPayClass.vtu.getCableBundes(operator);
       console.log(cableBundles);
 })();
   //get account detail
   const RoqquPay = require('roqqupay-nodejs');
  (async function(){
      //your roqqu secret key
       const secretKey = 'Bearer RQ-SEC-XXXXXXXXX';
       const RoqquPayClass = new RoqquPay(secretKey);
       const getAccountData = await RoqquPayClass.account.getAccountDetail();
       console.log(getAccountData);
 })();
   //verify bvn
   const RoqquPay = require('roqqupay-nodejs');
  (async function(){
      //your roqqu secret key
       const secretKey = 'Bearer RQ-SEC-XXXXXXXXX';
       const RoqquPayClass = new RoqquPay(secretKey);
       const bvn = 'bvn digits';
       const verifyBvn = await RoqquPayClass.account.bvnVerify(bvn);
       console.log(verifyBvn);
 })();
   //get banks
   const RoqquPay = require('roqqupay-nodejs');
  (async function(){
      //your roqqu secret key
       const secretKey = 'Bearer RQ-SEC-XXXXXXXXX';
       const RoqquPayClass = new RoqquPay(secretKey);
       const banks = await RoqquPayClass.account.getBanks();
       console.log(banks);
 })();
   //verify account detail
   const RoqquPay = require('roqqupay-nodejs');
  (async function(){
      //your roqqu secret key
       const secretKey = 'Bearer RQ-SEC-XXXXXXXXX';
       const RoqquPayClass = new RoqquPay(secretKey);
       const accountNumber = 'bank account number';
       const bankName = 'This is the name of the bank gotten from the bank list api';
       const resolveAccount = await RoqquPayClass.account.accountResolve(accountNumber, bankName);
       console.log(resolveAccount);
 })();
   //get roqqu account detail
   const RoqquPay = require('roqqupay-nodejs');
  (async function(){
      //your roqqu secret key
       const secretKey = 'Bearer RQ-SEC-XXXXXXXXX';
       const RoqquPayClass = new RoqquPay(secretKey);
       const account = await RoqquPayClass.account.getAccountDetail();
       console.log(account);
 })();
   //get roqqu transactions
   const RoqquPay = require('roqqupay-nodejs');
  (async function(){
      //your roqqu secret key
       const secretKey = 'Bearer RQ-SEC-XXXXXXXXX';
       const RoqquPayClass = new RoqquPay(secretKey);
       const transactions = await RoqquPayClass.account.getTransactions();
       console.log(transactions);
 })();
   //verify NIN
   const RoqquPay = require('roqqupay-nodejs');
  (async function(){
      //your roqqu secret key
       const secretKey = 'Bearer RQ-SEC-XXXXXXXXX';
       const RoqquPayClass = new RoqquPay(secretKey);
       const nin = 'NIN digits';
       const verifyNin = await RoqquPayClass.account.verifyNin(nin);
       console.log(verifyNin);
 })();
0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago