Function
Static Public Summary | ||
public |
getSchools(query: string): Promise<School[]> Get the schools matching |
|
public |
Create a new Magister object using |
Static Public
public getSchools(query: string): Promise<School[]> source
import {getSchools} from 'magister.js/src/magister.js'
Get the schools matching query
.
Params:
Name | Type | Attribute | Description |
query | string |
public magister(options: Object): Promise<Magister> source
import magister from 'magister.js/src/magister.js'
Create a new Magister object using options
.
Params:
Name | Type | Attribute | Description |
options | Object | ||
options.school | School | The school to login to. |
|
options.username | string |
|
The username of the user to login to. |
options.password | string |
|
The password of the user to login to. |
options.token | string |
|
The Bearer token to use. (instead of the username and password) |
options.keepLoggedIn | boolean |
|
Whether or not to keep the user logged in. |
options.login | boolean |
|
Whether or not to call login before returning the object. |
options.authCode | string |
|
The AuthCode that Magister uses in their requests. Per default we use the value from the @magisterjs/authcode package. Which you should keep up-to-date. |