Class

Season

Season(seasonData)

Represents a Apex Legends season.

Constructor

# new Season(seasonData)

Parse a Season object from JSON.

Parameters:
Name Type Description
seasonData seasonData

Apex Legends season data

View Source classes/Season.js, line 9

Members

Array.<Playlist>

# readonly nullable currentLTMs

Array of currently-active limited time modes, or null if none found.

View Source classes/Season.js, line 162

# readonly currentMaps

Gets an array of current maps from this instance's getMapsByDate method.

View Source classes/Season.js, line 110

# readonly currentPlaylists

Gets an array of current playlists via this instance's getPlaylistsByDate method.

View Source classes/Season.js, line 99

Array.<Playlist>

# readonly nullable currentTakeovers

Array of currently-active limited time modes which replace another playlist in the season, or null if none found.

View Source classes/Season.js, line 193

date

# endTime

The time at which the season ends.

View Source classes/Season.js, line 37

number

# id

The season number (e.g. 12).

View Source classes/Season.js, line 19

Array.<Playlist>

# readonly nullable LTMs

Array of limited time modes for this season, or null if none found.

View Source classes/Season.js, line 149

string

# name

The title of the season (e.g. Defiance).

View Source classes/Season.js, line 25

Array.<PlaylistItem>

# readonly nullable nextMaps

Gets an array containing the upcoming PlaylistItems for each Playlist by calling the .nextMap method on each instance (depending on playlist type, e.g. RotatingPlaylist#nextMap). Takes into account whether a takeover LTM is about to end and will attempt to replace this entry with the 'regular' mode map.

View Source classes/Season.js, line 125

Array.<Playlist>

# playlists

Array of Playlists for this season.

View Source classes/Season.js, line 43

# readonly ranked

Alias for Ranked Leagues.

Deprecated:
  • Yes
To Do:
  • remove this alias?

View Source classes/Season.js, line 85

date

# startTime

The time at which the season starts.

View Source classes/Season.js, line 31

Array.<Playlist>

# readonly nullable takeovers

Array of limited time modes in this season which replace another mode, or null if none found.

View Source classes/Season.js, line 178

# readonly unranked

Alias for Play Apex mode.

Deprecated:
  • Yes
To Do:
  • remove this alias?

View Source classes/Season.js, line 70

Methods

# getMapsByDate(dateopt) → (nullable) {Array.<ScheduledPlaylistItem>}

Get an Array of maps active at a given date, or the current date if not provided. Returns null if outside of season date boundaries.

Parameters:
Name Type Attributes Default Description
date parseableDate <optional>
new Date()

the query date

To Do:
  • should return null if no maps found.

View Source classes/Season.js, line 251

an array of maps or null

Array.<ScheduledPlaylistItem>

# getPlaylistsByDate(date) → (nullable) {Array.<Playlist>}

Get an array of Playlist subclass instances active during the provided date, or the current date if not provided. Returns null if none found.

Parameters:
Name Type Description
date parseableDate

the query date

View Source classes/Season.js, line 227

active playlists or null

Array.<Playlist>

# parsePlaylist(playlistData) → {SingleItemPlaylist|RotatingPlaylist|SplitPlaylist}

Take playlist data and parse into an instance of a Playlist subclass, determined by querying sections of the data.

Parameters:
Name Type Description
playlistData playlistData

data for this playlist

To Do:
  • move into a private or static method

View Source classes/Season.js, line 210