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 into.
  • username (String) The username of the user to log into.
  • password (String) The password of the user to log into. (not permanently stored)

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

.getTodo()

Get a list of tasks todo. Returns Promise<Array<Task>>

.getHomework(<id>)

.getQuiz(<id>)

.getFlexibleTask(<id>)

.getSpellingTest(<id>)

.getHomeworkSubmission(<id>)

.getQuizSubmission(<id>)

.getFlexibleTaskSubmission(<id>)

.getSpellingTestSubmission(<id>)

.getTeacher(<id>)

.getSubmissionMethods()

Get a list of submission methods. Returns Promise<Array<SubmissionMethod>>

.searchSchools(<term>[, options])

Clone this wiki locally