ClassDo API client for NodeJS.
Install via npm
npm install @classdo/classdo
Install via yarn
yarn add @classdo/classdo
const { ClassDoAPIClient } = require('@classdo/classdo')
const client = new ClassDoAPIClient({ accessToken: 'xxxxxxxx' })
client.viewer().then(result => {
// fetch viewer
console.log(result)
})
All request apis accept request to fetch specified fields and related object according to our GraphQLSchema.
Like below.
client.viewer.get(['id'], {
rooms: { fields: ['id', 'name'] } // request to fetch rooms also
}).then(v => {
if (v.data) {
console.log(v.data) // viewer
console.log(v.data.rooms.edges) // rooms
}
})
You can see our GraphQL schema details here.
See this document.
MIT
Generated using TypeDoc