Home Manual Reference Source Test Repository
public class | source

Helper

class for saving anime shows.

Constructor Summary

Public Constructor
public

constructor(name: String, debug: Boolean)

Create an helper object for anime content.

Member Summary

Public Members
public

The name of the torrent provider.

Private Members
private

_hummingbird: HummingbirdAPI

A configured HummingBird API.

private

The util object with general functions.

Method Summary

Public Methods
public

addEpisodes(anime: Show, episodes: Object, slug: String): Anime

Adds episodes to a anime.

public

Get info from Hummingbird and make a new anime object.

Private Methods
private

_addSeason(anime: Anime, episodes: Object, seasonNumber: Integer, slug: String): *

Adds one season to a anime.

private

_updateEpisode(matching: Object, found: Object, anime: Anime, quality: String): Anime

Update the torrents for an existing anime.

private

Update a given anime with it's associated episodes.

private

Update the number of seasons of a given anime.

Public Constructors

public constructor(name: String, debug: Boolean) source

Create an helper object for anime content.

Params:

NameTypeAttributeDescription
name String

The name of the content provider.

debug Boolean
  • nullable: true

Debug mode for extra output.

Public Members

public name: String source

The name of the torrent provider.

Private Members

private _hummingbird: HummingbirdAPI source

A configured HummingBird API.

See:

private _util: Util source

The util object with general functions.

Public Methods

public addEpisodes(anime: Show, episodes: Object, slug: String): Anime source

Adds episodes to a anime.

Params:

NameTypeAttributeDescription
anime Show

The anime to add the torrents to.

episodes Object

The episodes containing the torrents.

slug String

The slug of the anime.

Return:

Anime

A anime with updated torrents.

public getHummingbirdInfo(slug: String): Anime source

Get info from Hummingbird and make a new anime object.

Params:

NameTypeAttributeDescription
slug String

The slug to query https://hummingbird.me/.

Return:

Anime

A new anime without the episodes attached.

Private Methods

private _addSeason(anime: Anime, episodes: Object, seasonNumber: Integer, slug: String): * source

Adds one season to a anime.

Params:

NameTypeAttributeDescription
anime Anime

The anime to add the torrents to.

episodes Object

The episodes containing the torrents.

seasonNumber Integer

The season number.

slug String

The slug of the anime.

Return:

*

private _updateEpisode(matching: Object, found: Object, anime: Anime, quality: String): Anime source

Update the torrents for an existing anime.

Params:

NameTypeAttributeDescription
matching Object

The matching episode of new the anime.

found Object

The matching episode existing anime.

anime Anime

The anime to merge the episodes to.

quality String

The quality of the torrent.

Return:

Anime

An anime with merged torrents.

private _updateEpisodes(anime: Anime): Anime source

Update a given anime with it's associated episodes.

Params:

NameTypeAttributeDescription
anime Anime

The anime to update its episodes.

Return:

Anime

A newly updated anime.

private _updateNumSeasons(anime: Anime): Anime source

Update the number of seasons of a given anime.

Params:

NameTypeAttributeDescription
anime Anime

The anime to update the number of seasons.

Return:

Anime

A newly updated anime.