https://github.com/zimbora/inloc-api
NPM module - API to interact with Inloc services
https://github.com/zimbora/inloc-api
Last synced: about 1 month ago
JSON representation
NPM module - API to interact with Inloc services
- Host: GitHub
- URL: https://github.com/zimbora/inloc-api
- Owner: zimbora
- Created: 2023-05-04T17:13:02.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-09T16:39:48.000Z (about 3 years ago)
- Last Synced: 2025-03-03T06:45:49.277Z (over 1 year ago)
- Language: JavaScript
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: Changelog.md
Awesome Lists containing this project
README
# Example
```
var api = require('inloc-api')
api.init({
domain: "ask for domain",
auth:{
token:"ask for token"
}
})
api.state()
.then(res => console.log(res))
.catch(err => console.log(err))
api.getWiFiCredentials(63)
.then(res => console.log(res))
.catch(err => console.log(err))
api.getInfo(63)
.then(res => console.log(res))
.catch(err => console.log(err))
aaa();
async function aaa(){
const credentials = await api.getWiFiCredentials(63);
}
```
# Tests
## run all tests
>> npm run
## run only one test
>> npx jest --testPathPattern=controller.test.js