Warning: This is very much work in progress
This is a client for the Skylark LIVE GraphQL API, used as a CLI tool or library for interacting with the API.
Currently only a very few features and CLI commands exists.
Currently this is not published to npm, so you need to clone the repository
git clone [email protected]:madethis/skylark-client-node.git
cd skylark-client-node
npm install
A Client class is exported from the library, which can be used to interact with the API.
node cli.js --help
Can be used to verify a authenticated connection to the API.
A personal access token can be generated from the documentation section in the Skylark Live admin interface.
node cli.js \
--host "https://admin.skylark.live" \
--token "xxx" \
test
Can be used to fetch device reading values for a specific device, either for specific series, or from all series.
Readings are written to files in CSV format as they are fetched.
node cli.js \
--host "https://admin.skylark.live" \
--token "xxx" \
--device "0000-0000-0000-0000" \
--from "2024-05-01T00:00:00Z" \
--to "2020-06-01T00:00:00Z" \
device_reading_values
Or only series for a specific input / name
node cli.js \
--host "https://admin.skylark.live" \
--token "xxx" \
--device "0000-0000-0000-0000" \
--input "input1" \
--from "2024-05-01T00:00:00Z" \
--to "2020-06-01T00:00:00Z" \
device_reading_values
node cli.js \
--host "https://admin.skylark.live" \
--token "xxx" \
--device "0000-0000-0000-0000" \
--name "temperature" \
--from "2024-05-01T00:00:00Z" \
--to "2020-06-01T00:00:00Z" \
device_reading_values