EmoteFetcher

EmoteFetcher

new EmoteFetcher()

Source:

The fetcher that gets and caches emotes.

Members

channels :Collection.<string, Channel>

Source:

Cached channels.
Collectionped by name to Channel instance.

Type:

emotes :Collection.<string, Emote>

Source:

Cached emotes.
Collectionped by emote code to Emote instance.

Type:

(readonly, nullable) globalChannel :Channel

Source:

The global channel for both Twitch and BTTV.

Type:

options :Object

Source:

Options for the fetcher.

Type:
  • Object

Methods

(private) _cacheBTTVEmote(name, data) → {BTTVEmote}

Source:

Converts and caches a raw BTTV emote.

Parameters:
Name Type Description
name string

Name of the channel.

data Object

Raw data.

Returns:
Type
BTTVEmote

(private) _cacheFFZEmote(name, data) → {FFZEmote}

Source:

Converts and caches a raw FFZ emote.

Parameters:
Name Type Description
name string

Name of the channel.

data Object

Raw data.

Returns:
Type
FFZEmote

(private) _cacheTwitchEmote(id, data) → {TwitchEmote}

Source:

Converts and caches a raw twitch emote.

Parameters:
Name Type Description
id string

ID of the emote.

data Object

Raw data.

Returns:
Type
TwitchEmote

(private) _getRawBTTVEmotes(name) → {Promise.<Array.<Object>>}

Source:

Gets the raw BTTV emotes data for a channel.

Parameters:
Name Type Description
name string

Name of the channel.

Returns:
Type
Promise.<Array.<Object>>

(private) _getRawFFZEmotes(name) → {Promise.<Array.<Object>>}

Source:

Gets the raw FFZ emotes data for a channel.

Parameters:
Name Type Description
name string

Name of the channel.

Returns:
Type
Promise.<Array.<Object>>

(private) _getRawTwitchEmotes() → {Promise.<Object>}

Source:

Gets the raw twitch emotes data.

Returns:
Type
Promise.<Object>

fetchBTTVEmotes(nameopt) → {Promise.<Collection.<string, BTTVEmote>>}

Source:

Fetches the BTTV emotes for a channel.

Parameters:
Name Type Attributes Default Description
name string <optional>
null

Name of the channel.

Returns:
Type
Promise.<Collection.<string, BTTVEmote>>

fetchFFZEmotes(name) → {Promise.<Collection.<string, FFZEmote>>}

Source:

Fetches the FFZ emotes for a channel.

Parameters:
Name Type Description
name string

Name of the channel.

Returns:
Type
Promise.<Collection.<string, FFZEmote>>

fetchTwitchEmotes() → {Promise.<Collection.<string, TwitchEmote>>}

Source:

Fetches and caches all twitch emotes.

Returns:
Type
Promise.<Collection.<string, TwitchEmote>>

EmoteFetcher

new EmoteFetcher(options)

Source:

Creates a new fetcher.

Parameters:
Name Type Description
options Object

Options for the fetcher.

Members

channels :Collection.<string, Channel>

Source:

Cached channels.
Collectionped by name to Channel instance.

Type:

emotes :Collection.<string, Emote>

Source:

Cached emotes.
Collectionped by emote code to Emote instance.

Type:

(readonly, nullable) globalChannel :Channel

Source:

The global channel for both Twitch and BTTV.

Type:

options :Object

Source:

Options for the fetcher.

Type:
  • Object

Methods

(private) _cacheBTTVEmote(name, data) → {BTTVEmote}

Source:

Converts and caches a raw BTTV emote.

Parameters:
Name Type Description
name string

Name of the channel.

data Object

Raw data.

Returns:
Type
BTTVEmote

(private) _cacheFFZEmote(name, data) → {FFZEmote}

Source:

Converts and caches a raw FFZ emote.

Parameters:
Name Type Description
name string

Name of the channel.

data Object

Raw data.

Returns:
Type
FFZEmote

(private) _cacheTwitchEmote(id, data) → {TwitchEmote}

Source:

Converts and caches a raw twitch emote.

Parameters:
Name Type Description
id string

ID of the emote.

data Object

Raw data.

Returns:
Type
TwitchEmote

(private) _getRawBTTVEmotes(name) → {Promise.<Array.<Object>>}

Source:

Gets the raw BTTV emotes data for a channel.

Parameters:
Name Type Description
name string

Name of the channel.

Returns:
Type
Promise.<Array.<Object>>

(private) _getRawFFZEmotes(name) → {Promise.<Array.<Object>>}

Source:

Gets the raw FFZ emotes data for a channel.

Parameters:
Name Type Description
name string

Name of the channel.

Returns:
Type
Promise.<Array.<Object>>

(private) _getRawTwitchEmotes() → {Promise.<Object>}

Source:

Gets the raw twitch emotes data.

Returns:
Type
Promise.<Object>

fetchBTTVEmotes(nameopt) → {Promise.<Collection.<string, BTTVEmote>>}

Source:

Fetches the BTTV emotes for a channel.

Parameters:
Name Type Attributes Default Description
name string <optional>
null

Name of the channel.

Returns:
Type
Promise.<Collection.<string, BTTVEmote>>

fetchFFZEmotes(name) → {Promise.<Collection.<string, FFZEmote>>}

Source:

Fetches the FFZ emotes for a channel.

Parameters:
Name Type Description
name string

Name of the channel.

Returns:
Type
Promise.<Collection.<string, FFZEmote>>

fetchTwitchEmotes() → {Promise.<Collection.<string, TwitchEmote>>}

Source:

Fetches and caches all twitch emotes.

Returns:
Type
Promise.<Collection.<string, TwitchEmote>>