1.0.1 • Published 4 years ago

sgbteam-api v1.0.1

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

SGBTeam-API

SGB Team Official API to Check SGB Code Validation

PHP Version : https://github.com/dandyraka/SGB-Team-API

Install

npm install sgbteam-api

Example

const { WebBased, WebBasedRegion, CLIBased } = require('sgbteam-api');

// Initializing a variable
const SGB_CODE = 'YOUR_CODE'
const SGB_SECRET = 'YOUR_SECRET'
const SGB_REGION = 'YOUR_REGION'

/* Web Based */
WebBased(SGB_CODE, SGB_SECRET).then(response => {
  console.log(response) // true or false
})

/* Web Based (Region) */
// Maybe you can use it for absent regional members
WebBasedRegion(SGB_CODE, SGB_SECRET, SGB_REGION).then(response => {
  console.log(response) // true or false
})

/* CLI Based */
CLIBased(SGB_CODE, SGB_SECRET).then(response => {
  console.log(response) // true or false
})

// or use await
console.log(await CLIBased(SGB_CODE, SGB_SECRET))

Results

true  : valid
false : invalid