Class

ApexObj

ApexObj(seasonsData)

This is the base class for the module, and the first port of call for making queries. All data available for the module is parsed into an object, for which this class is the starting point.

It parses information from /data/seasons.json and uses this to construct an array of Season objects. Each is comprised of properties (and psuedo, 'read only' properties retrieved using getters) containing useful information such as start and end times, and an array of playlists available during the season, each constructed from a class which extends the base Playlist class. Each season and playlist contains further methods for querying current maps and modes available at the time the methods were called or at some specified date.

Constructor

# new ApexObj(seasonsData)

Creates the base object for the module. Throws an error if no data is provided.

Parameters:
Name Type Description
seasonsData object

data parsed from /data/seasons.json

View Source classes/ApexObj.js, line 20

Members

Array.<ScheduledPlaylistItem>

# readonly nullable currentLTMs

Returns an array of the currently-running limited time modes for the current season, or null if none found.

View Source classes/ApexObj.js, line 98

Array.<ScheduledPlaylistItem>

# readonly nullable currentMaps

Returns an array of current maps (PlaylistItems), or null if not called during a season or if no maps are found.

View Source classes/ApexObj.js, line 72

Season

# readonly nullable currentSeason

Returns the current Season, or null if outside of the date boundaries for available seasons.

View Source classes/ApexObj.js, line 46

Array.<Playlist>

# readonly nullable currentTakeovers

Returns an array of the current limited time modes which replace 'standard' modes, or null if none found.

View Source classes/ApexObj.js, line 111

Array.<ScheduledPlaylistItem>

# readonly nullable nextMaps

Returns an array of the upcoming maps (as ScheduledPlaylistItems) or null if none found.

View Source classes/ApexObj.js, line 85

Season

# readonly nullable nextSeason

Returns the next Season via Season#getSeasonByDate, or null if no data available.

View Source classes/ApexObj.js, line 60

Array.<Season>

# seasons

Array of seasons

View Source classes/ApexObj.js, line 35

Methods

# getMapsByDate(dateopt)

Returns an array of the current maps (ScheduledPlaylistItems) for the given date, or null if none found. Uses the current date if none provided.

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

View Source classes/ApexObj.js, line 138

# getSeasonByDate(dateopt) → (nullable) {Season}

Returns the season for the given date, or null if none found. Uses the current date if none provided.

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

the date to query

View Source classes/ApexObj.js, line 123

Season