1.0.1 • Published 4 years ago

miniapps-link-test v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Starlord SDK - LAPS

This sdk to get access to LAPS service

Installation

Use the package manager npm to install starlord. using NPM

npm install startlord --save // when we have publish to npm

or using Yarn

yarn add startlord

Usage

create this usingSDK.js file

import MiniApps from 'miniapps-sdk';

const options = {
    baseURL: "http://api-url.starlord-LAPS.io/api/",
    httpsAgent: true,
    httpAgent: true,
    consumerToken: '902328248jksjds',
    accessToken: 'wallet',
}
/** Initiate MiniApps */
const MiniApp = new MiniApps(options)

export default MiniApp;

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Available Function

FunctionparamsDescription
checkDeviceIddeviceIdchecking device id is it already login or not
userLoginlogin to LAPS to get token, checkDeviceId need to be executed first
getUserProfileget data user
userLoginWithoutAuthuser enter partner site without login in LAPS
getTokenAccesscunsomer, accesToken---
getBalanceidget balance user by id
getUserTokenPaymentid, oderIdget user token payment by userId , orderId
getUserQRidget QR code by id

EXAMPLE

<!--using Import-->
import MiniAppSDK from './usingSDK';
<!--using require-->
const MiniAppSDK = require('./usingSDK');

<!--Check device ID-->
MiniAppSDK.checkDeviceId(yourDeviceId);
<!--User login-->
MiniAppSDK.userLogin();
<!--Get user Profile-->
MiniAppSDK.getUserProfile();

License

MIT

1.0.1

4 years ago

1.0.0

4 years ago