Event

Event

Represents an Event on SMHW.


Constructor

new Event(client, response)

Instantiate an Event 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

assignment_id :Number

The ID of the assignment that the event refers to.

Type:
  • Number

assignment_title :String

The title of the assignment that the event refers to.

Type:
  • String

assignment_type :String

The type of the assignment that the event refers to.

Type:
  • String

created_at :Number

The timestamp of when the event was created.

Type:
  • Number

event_type :String

The type of event.

Type:
  • String

eventable :Object

Information for what the event refers to.

Type:
  • Object

id :Number

The ID of the event.

Type:
  • Number

parent_forename :String

The forename of the parent who the event refers to.

Type:
  • String

parent_surname :String

The surname of the parent who the event refers to.

Type:
  • String

read :Boolean

Whether or not the event has been read as of yet.

Type:
  • Boolean

recipient_id :Number

The recipient of the event.

Type:
  • Number

student_forename :String

The forename of the student who the event refers to.

Type:
  • String

submission_id :Number

The ID of the submission that the event refers to.

Type:
  • Number

user_id :Number

The ID of the user who created the event.

Type:
  • Number

user_name :String

The name of the user who created the event.

Type:
  • String

Methods

clear() → {Promise.<Event>}

Clear the event.

Returns:
Type
Promise.<Event>