# Class: Player

## Player()

Player Model ------------------------------------------------------------- A model representing a single player in the game.

## Constructor

#### new Player()

Source:
  - app/models/Player.model.js, line 11

### Extends

- Model

### Members

#### (static) schema

Define the flitter-orm schema of the model.

Source:
  - app/models/Player.model.js, line 22

### Methods

#### (async, static) get_unobligated_players()

returns all of the unobligated players across all teams

Source:
  - app/models/Player.model.js, line 87

##### Returns:

Promise<Array<Player>>

#### (async) is_obligated() → {Promise.<boolean>}

Determine whether the player belongs to a team or not.

Source:
  - app/models/Player.model.js, line 117

##### Returns:

- true if the player is obligated

Type
  Promise.<boolean>

#### (async) points_for_week(week_num)

Returns the stats for the player for the given week.

##### Parameters:

Name | Type | Description
--- | --- | ---
`week_num` | number |

Source:
  - app/models/Player.model.js, line 108

##### Returns:

Promise<WeeklyPlayerStat>

#### (async) to_api(with_statsopt)

Cast the player to a format compatible with the API.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`with_stats` | boolean | <optional> | false | if true, look up the player's weekly stats

Source:
  - app/models/Player.model.js, line 132

##### Returns:

Promise