sync-pk-sp/SimplyAPI/examples/other.js
2022-03-01 19:46:17 -08:00

26 lines
No EOL
546 B
JavaScript

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()