new Anime( jsonObject, folderPath )

Description

Store the datas of an anime. Can update the index.json of the anime.

Parameters
Name Type Description
jsonObject JsonObject
folderPath string
Details

Members


<static, readonly> list :Array.<Anime>

Description

The list of Animes

Details
Array.<Anime>

<static> publicList

Description

The list of Animes mapped with their public informations

Returns
Details

<private, readonly> jsonObject :JsonObject

Description

The json object of the anime. Used to store the datas in the index.json of the anime.

Details
JsonObject

name :string

Description

The name of the anime

Details
string

Description

The uri of the anime poster

Details
string

<private, readonly> _path :string

Description

The path to the anime's folder

Details
string

episodes :Array.<Episode>

Description

The list of episodes

Details
Array.<Episode>

<readonly> id :number

Description

The unique id of the anime

Details
number

<readonly> path

Description

Return the path to the anime folder

Returns
Details

Methods


toPublic() → {PublicAnime}

Description

Return the public information of the anime (= the informations to give to the client)

Returns
Details

getEpisodeById( episodeId ) → {Episode|null}

Description

Get an anime's Episode by its id

Parameters
Name Type Description
episodeId number
Returns
Details

{Episode#episodeId}


updateJson() → {Promise.<void>}

Description

Update the json by generating the AnimeConfig and getting the EpisodeConfig of all its episode

Returns
Details

JsonObject


toAnimeConfig() → {AnimeConfig}

Description

Return the AnimeConfig of the Anime

Returns
Details