Module

services/episode

Service to handle the fetch of episodes

Members

Object

# inner constant tvShows

Cache TV Shows

Methods

# async inner getEpisode(id, segmentationValueopt) → {Promise.<Episode>}

Get an episode

Parameters:
Name Type Attributes Description
id string | number

Episode Id

segmentationValue string <optional>

optional segment to get a different config

Episode

Promise.<Episode>

# async inner getEpisodes(id, segmentationValueopt) → {Promise.<Array.<Episode>>}

Get episodes from a season

Parameters:
Name Type Attributes Description
id string | number

Season Id

segmentationValue string <optional>

optional segment to get a different config

Episodes

Promise.<Array.<Episode>>

# async inner getNextEpisode(params) → {Episode|undefined}

Gets the next episode from a provided episode based on the episodes and seasons

Parameters:
Name Type Attributes Description
params object

parameter object

episode Episode

episode to look for

episodes Array.<Episode>

list of episodes associated with the episode

seasons Array.<Season>

list of seasons associated with the episode

segmentationValue string <optional>

optional segment to get a different value based on config

next episode or nothing

Episode | undefined

# async inner getNextEpisodeFromNextSeason(params) → {Episode|null}

Parameters:
Name Type Attributes Description
params object

parameter object

episode Episode

parameter object

seasons Array.<Season>

parameter object

segmentationValue object <optional>

parameter object

next episode or null if there's none

Episode | null

# async inner getNextEpisodes(params) → {Promise.<Array.<Episode>>}

Gets the next episodes from a provided episode based on the episodes and seasons

Parameters:
Name Type Attributes Description
params object

parameter object

episode Episode

episode to look for

episodes Array.<Episode>

list of episodes associated with the episode

seasons Array.<Season>

list of seasons associated with the episode

segmentationValue string <optional>

optional segment to get a different value based on config

next episodes

Promise.<Array.<Episode>>

# async inner getPrevEpisode(params) → {Episode|undefined}

Gets the previous episode from a provided episode based on the episodes and seasons

Parameters:
Name Type Attributes Description
params object

parameter object

episode Episode

episode to look for

episodes Array.<Episode>

list of episodes associated with the episode

seasons Array.<Season>

list of seasons associated with the episode

segmentationValue string <optional>

optional segment to get a different value based on config

previous episode or nothing

Episode | undefined

# async inner getPrevEpisodes(params) → {Promise.<Array.<Episode>>}

Gets the previous episodes from a provided episode based on the episodes and seasons

Parameters:
Name Type Attributes Description
params object

parameter object

episode Episode

episode to look for

episodes Array.<Episode>

list of episodes associated with the episode

seasons Array.<Season>

list of seasons associated with the episode

segmentationValue string <optional>

optional segment to get a different value based on config

next episodes

Promise.<Array.<Episode>>

# async inner getTvShow(rawEpisode, segmentationValueopt) → {Promise.<Object>}

Get the TV Show from a ID

Parameters:
Name Type Attributes Description
rawEpisode Object

Raw Episode

segmentationValue string <optional>

optional segment to get a different config

TV Show

Promise.<Object>