ClassGroup

ClassGroup

Represents a class group on SMHW.


Constructor

new ClassGroup(client, response)

Instantiate a ClassGroup object.

Parameters:
Name Type Description
client Client

The client that is instantiating the object.

response Object

The data for the object.

Members

(private) _client :Client

The client that instantiated this object.

Type:
  • Client

academic_year_id :Number

The ID of the academic year that the class group is in.

Type:
  • Number

class_year :String

The class year that the class group is in.

Type:
  • String

id :Number

The ID of the class group

Type:
  • Number

imported_via_sims :Boolean

Whether or not the class group has been imported via sims.

Type:
  • Boolean

is_registration_group :Boolean

Whether or not the class group is a registration group.

Type:
  • Boolean

left_at :Number

The timestamp of when the class group left. (?)

Type:
  • Number

Links for API resources for the class group.

Type:
  • Object

name :String

The name of the class group.

Type:
  • String

school_id :Number

The ID of the school that the class group belongs to.

Type:
  • Number

student_ids :Array.<Number>

An array of IDs for students in the class group.

Type:
  • Array.<Number>

teacher_ids :Array.<Number>

An array of IDs for teachers in the class group.

Type:
  • Array.<Number>

Methods

getSchool() → {Promise.<School>}

Get the school that the class group belongs to.

Returns:
Type
Promise.<School>

getStudents(idsopt) → {Promise.<Array.<Student>>}

Get students in the class group.

Parameters:
Name Type Attributes Description
ids Array.<Number> <optional>

An array of student IDs to retrieve.

Returns:
Type
Promise.<Array.<Student>>

getTeachers(idsopt) → {Promise.<Array.<Employee>>}

Get teachers in the class group.

Parameters:
Name Type Attributes Description
ids Array.<Number> <optional>

An array of teacher IDs to retrieve.

Returns:
Type
Promise.<Array.<Employee>>