ClassYear

ClassYear

Represents a class year on SMHW.


Constructor

new ClassYear(client, response)

Instantiate a ClassYear 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

active :Boolean

Whether or not the class year is active.

Type:
  • Boolean

class_group_ids :Array.<Number>

An array of class groups IDs in the class year.

Type:
  • Array.<Number>

created_at :Number

The timestamp of when the class year was created.

Type:
  • Number

has_students :Boolean

Whether or not the class year has students.

Type:
  • Boolean

id :Number

The ID of the class year.

Type:
  • Number

id :Number

The ID of the class year.

Type:
  • Number

name :String

The name of the class year.

Type:
  • String

position :Number

The position of the class year in the school.

Type:
  • Number

school_id :Number

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

Type:
  • Number

updated_at :Number

The timestamp of when the class year was last updated.

Type:
  • Number

Methods

getSchool() → {Promise.<School>}

Get the school that the class year belongs to.

Returns:
Type
Promise.<School>