Skip to content
This repository was archived by the owner on Jul 24, 2025. It is now read-only.
Edward Smale edited this page Apr 7, 2020 · 8 revisions

Client

Represents a SMHW client.

Constructor

  • options (Object) The options for the client.

Properties

.access (Access) Authorisation information for the client to make authorised requests.

.student (Student) The student user that the client represents.

.user (User) The user that the client represents.

Methods

.stopHeartbeat()

Stop the client pulsing heartbeat, if available. Returns nothing.

.login(<school_id>, <username>, <password>)

  • .school_id (Number) The ID of the school to log onto.
  • .username (String) The username of the user to log onto.
  • .password (String) The password of the user to log onto. (not permanently stored)

Get an authorisation token to make authorised requests, get private user data and get school information. Returns Promise<true>

Clone this wiki locally