Home Reference Source

Function

Static Public Summary
public

Get the schools matching query.

public

Create a new Magister object using options.

Static Public

public getSchools(query: String): Promise<School[]> source

import {getSchools} from 'magister.js/src/magister.js'

Get the schools matching query.

Params:

NameTypeAttributeDescription
query String

Return:

Promise<School[]>

public magister(options: Object): Promise<Magister> source

import magister from 'magister.js/src/magister.js'

Create a new Magister object using options.

Params:

NameTypeAttributeDescription
options Object
options.school School

The school to login to.

options.username String
  • optional

The username of the user to login to.

options.password String
  • optional

The password of the user to login to.

options.token String
  • optional

The Bearer token to use. (instead of the username and password)

options.keepLoggedIn Boolean
  • optional
  • default: true

Whether or not to keep the user logged in.

options.login Boolean
  • optional
  • default: true

Whether or not to call login before returning the object.

Return:

Promise<Magister>