# ClientEvent

Represents an Event on SMHW.

## Constructor

#### new ClientEvent(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.

Source:
  - structures/ClientEvent.js, line 13

### Members

#### (private) _client :Client

The client that instantiated this object.

Type:

- Client

Source:
  - structures/ClientEvent.js, line 19

#### assignment_id :Number

The ID of the assignment that the event refers to.

Type:

- Number

Source:
  - structures/ClientEvent.js, line 25

#### assignment_title :String

The title of the assignment that the event refers to.

Type:

- String

Source:
  - structures/ClientEvent.js, line 31

#### assignment_type :String

The type of the assignment that the event refers to.

Type:

- String

Source:
  - structures/ClientEvent.js, line 37

#### created_at :Number

The timestamp of when the event was created.

Type:

- Number

Source:
  - structures/ClientEvent.js, line 43

#### event_type :String

The type of event.

Type:

- String

Source:
  - structures/ClientEvent.js, line 49

#### eventable :Object

Information for what the event refers to.

Type:

- Object

Source:
  - structures/ClientEvent.js, line 55

#### id :Number

The ID of the event.

Type:

- Number

Source:
  - structures/ClientEvent.js, line 61

#### parent_forename :String

The forename of the parent who the event refers to.

Type:

- String

Source:
  - structures/ClientEvent.js, line 67

#### parent_surname :String

The surname of the parent who the event refers to.

Type:

- String

Source:
  - structures/ClientEvent.js, line 73

#### read :Boolean

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

Type:

- Boolean

Source:
  - structures/ClientEvent.js, line 79

#### recipient_id :Number

The recipient of the event.

Type:

- Number

Source:
  - structures/ClientEvent.js, line 85

#### student_forename :String

The forename of the student who the event refers to.

Type:

- String

Source:
  - structures/ClientEvent.js, line 91

#### submission_id :Number

The ID of the submission that the event refers to.

Type:

- Number

Source:
  - structures/ClientEvent.js, line 97

#### user_id :Number

The ID of the user who created the event.

Type:

- Number

Source:
  - structures/ClientEvent.js, line 103

#### user_name :String

The name of the user who created the event.

Type:

- String

Source:
  - structures/ClientEvent.js, line 109

### Methods

#### clear() → {Promise.<Event>}

Clear the event.

Source:
  - structures/ClientEvent.js, line 116

Returns:

Type
  Promise.<Event>

#### getSubmissionComment() → {Promise.<SubmissionComment>}

Get the submission comment that the event refers to.

Source:
  - structures/ClientEvent.js, line 128

Returns:

Type
  Promise.<SubmissionComment>

#### getSubmissionEvent() → {Promise.<SubmissionEvent>}

Get the submission event that the event refers to.

Source:
  - structures/ClientEvent.js, line 136

Returns:

Type
  Promise.<SubmissionEvent>