@classdo/classdo
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

classdo.js

ClassDo API client for browsers and NodeJS.

CircleCI

Quick Start

Install via npm

npm install @classdo/classdo

Install via yarn

yarn add @classdo/classdo

Making requests

const { ClassDoAPIClient } = require('@classdo/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 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.

APIs

See this document.

License

MIT

Package Sidebar

Install

npm i @classdo/classdo

Weekly Downloads

1

Version

0.2.1

License

MIT

Unpacked Size

186 kB

Total Files

112

Last publish

Collaborators

  • chiew
  • joe-re
  • ktsn