1.0.0 • Published 3 years ago
@gokiteam/gls v1.0.0
GLS SDK
This is a Node.js library which implements goki lock service REST requests
How to use
Install
npm install --save @gokiteam/gls
Example
const { Gls, Enums: { PasscodeType } } = require('@gokiteam/gls')
const gls = new Gls({
clientId: 'your client id',
clientSecret: 'your client secret',
redirectUri: 'your redirect uri'
})
gls.getAccessToken({
username: 'your username',
password: 'your password'
})
.then(response => {
return gls.getPasscode({
accessToken: response.access_token,
lockId: 29382,
keyboardPwdType: PasscodeType.WeekendCyclic
})
})
.then(response => {
console.log(response)
})
.catch(error => {
console.log(error)
})