temporarily add SAPI
This commit is contained in:
parent
19f49e4a9d
commit
5622037719
9 changed files with 452 additions and 1 deletions
26
SimplyAPI/examples/other.js
Normal file
26
SimplyAPI/examples/other.js
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
const config = require('./config.json')
|
||||
const SAPI = require('./SimplyAPI.js')
|
||||
const SimplyAPI = new SAPI(config)
|
||||
|
||||
main = async () => {
|
||||
getSystem()
|
||||
getCurrentFronters()
|
||||
}
|
||||
|
||||
getSystem = async () => {
|
||||
SimplyAPI.getSystem()
|
||||
.then((response) => {
|
||||
console.log(response.data)
|
||||
})
|
||||
.catch(err => console.error(err))
|
||||
}
|
||||
|
||||
getCurrentFronters = async () => {
|
||||
SimplyAPI.getFronters()
|
||||
.then((response) => {
|
||||
console.log(response)
|
||||
})
|
||||
.catch(err => console.error(err))
|
||||
}
|
||||
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue