# Assignment

Represents a basic assignment on SMHW.

## Constructor

#### new Assignment(client, response)

Instantiate an Assignment object.

Parameters:

Name | Type | Description
--- | --- | ---
`client` | Client | The client that is instantiating the object.
`response` | Object | The data for the object.

Source:
  - structures/Assignment.js, line 12

### Members

#### (private) _client :Client

The client that instantiated this object.

Type:

- Client

Source:
  - structures/Assignment.js, line 18

#### attachment_ids :Array.<Number>

An array of IDs for attachments attached to the assignment.

Type:

- Array.<Number>

Source:
  - structures/Assignment.js, line 24

#### class_group_id :Number

The ID of the class group that the assignment was set for.

Type:

- Number

Source:
  - structures/Assignment.js, line 30

#### class_group_name :String

The name of the class group that the assignment was set for.

Type:

- String

Source:
  - structures/Assignment.js, line 36

#### class_year :String

The class year that the assignment was set for.

Type:

- String

Source:
  - structures/Assignment.js, line 42

#### community_resource_item_id :Number

The ID of the assignment community resource.

Type:

- Number

Source:
  - structures/Assignment.js, line 48

#### created_at :Number

The timestamp of when the assignment was created.

Type:

- Number

Source:
  - structures/Assignment.js, line 54

#### description :String

The description of the assignment.

Type:

- String

Source:
  - structures/Assignment.js, line 60

#### due_on :Number

The timestamp of when the assignment is due.

Type:

- Number

Source:
  - structures/Assignment.js, line 66

#### duration :String

The duration of the assignment.

Type:

- String

Source:
  - structures/Assignment.js, line 72

#### duration_units :String

The duration units of the assignment.

Type:

- String

Source:
  - structures/Assignment.js, line 78

#### has_unread_comments :Boolean

Whether or not the assignment has unread comments.

Type:

- Boolean

Source:
  - structures/Assignment.js, line 84

#### id :Number

The ID of the assignment.

Type:

- Number

Source:
  - structures/Assignment.js, line 90

#### issued_on :Number

The timestamp of when the assignment was issued.

Type:

- Number

Source:
  - structures/Assignment.js, line 96

#### published_at :Number

The timestamp of when the assignment was published.

Type:

- Number

Source:
  - structures/Assignment.js, line 102

#### purpose :String

The purpose of the assignment.

Type:

- String

Source:
  - structures/Assignment.js, line 108

#### school_id :Number

The ID of the school that the assignment is set for.

Type:

- Number

Source:
  - structures/Assignment.js, line 114

#### school_logo_url :String

The logo URL of of the school that the assignment is set for.

Type:

- String

Source:
  - structures/Assignment.js, line 120

#### school_name :String

The name of the school that the assignment is set for.

Type:

- String

Source:
  - structures/Assignment.js, line 126

#### subject :String

The subject of the assignment.

Type:

- String

Source:
  - structures/Assignment.js, line 132

#### submission_ids :Array.<Number>

An array of IDs for submissions

Type:

- Array.<Number>

Source:
  - structures/Assignment.js, line 138

#### submission_method_id :Number

The ID of the submission method to use.

Type:

- Number

Source:
  - structures/Assignment.js, line 144

#### submission_status :String

The status of the submission for the client user.

Type:

- String

Source:
  - structures/Assignment.js, line 150

#### teacher_id :Number

The ID of the teacher who set the assignment.

Type:

- Number

Source:
  - structures/Assignment.js, line 156

#### teacher_name :String

The name of the teacher who set the assignment.

Type:

- String

Source:
  - structures/Assignment.js, line 162

#### title :String

The title of the assignment.

Type:

- String

Source:
  - structures/Assignment.js, line 168

#### type :String

The assignment type.

Type:

- String

Source:
  - structures/Assignment.js, line 186

#### updated_at :Number

The timestamp of when the assignment was last updated.

Type:

- Number

Source:
  - structures/Assignment.js, line 174

#### web_links :Array.<WebLink>

An array of links to web resources for the assigment.

Type:

- Array.<WebLink>

Source:
  - structures/Assignment.js, line 180

### Methods

#### getAttachments(idsopt) → {Promise.<Array.<Attachment>>}

Get attachments attached to the assignment.

Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`ids` | Array.<Number> | <optional> | The IDs of the attachments to retrieve.

Source:
  - structures/Assignment.js, line 194

Returns:

Type
  Promise.<Array.<Attachment>>

#### getTeacher() → {Promise.<Employee>}

Get the teacher who set the assignment.

Source:
  - structures/Assignment.js, line 202

Returns:

Type
  Promise.<Employee>