SubmissionEvent

SubmissionEvent

Represents a submission event on SMHW.


Constructor

new SubmissionEvent(client, response)

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

content :String

The content of the event.

Type:
  • String

created_at :Number

The timestamp of when the event was created.

Type:
  • Number

event_type :String

The type of the submission event.

Type:
  • String

id :Number

The ID of the submission event.

Type:
  • Number

submission :Object

The submission information of the submission event.

Type:
  • Object

submission_id :String

The ID of the submission.

Type:
  • String

teacher_id :Number

The ID of the teacher who created the event.

Type:
  • Number

updated_at :Number

The timestamp of when the homework was last updated.

Type:
  • Number

user_name :String

The name of the user who created the event.

Type:
  • String

Methods

getSubmission() → {Promise.<HomeworkSubmission>}

Get submission that the event refers to.

Returns:
Type
Promise.<HomeworkSubmission>

getTeacher() → {Promise.<Employee>}

Get the teacher who created the event.

Returns:
Type
Promise.<Employee>