0.0.1 • Published 4 years ago

classdo v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

classdo.js

ClassDo API client for browsers and NodeJS.

CircleCI

Quick Start

Install via npm

npm install classdo

Install via yarn

yarn add classdo

Making requests

const { ClassDoAPIClient } = require('classdo')
const client = new ClassDoAPIClient({ accessToken: 'xxxxxxxx' })
client.viewer().then(result => {
  // fetch viewer
  console.log(result)
})

Interface

All request apis accept request to fetch specified fields and related object according 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 are here.

APIs

See this document.

License

MIT