Class: FavoritesStore

FavoritesStore()

new FavoritesStore()

Mixes In:
  • OO.EventEmitter
Source:

Methods

addFavorite(pageId) → {Promise}

Add a page ID to the favorites array

Parameters:
Name Type Description
pageId string
Source:
Returns:

Resolves when the page ID is added (or is not able to be).

Type
Promise

getAllFavoritesDetails() → {Promise}

Source:
Returns:
Type
Promise

getFavoriteDetail(pageId) → {Promise}

Get the details of a favorite (or favorites) by page ID(s) pageId can be a number or a string of numbers separated by '|'.

Parameters:
Name Type Description
pageId number | string
Source:
Returns:
Type
Promise

getFavoriteTitle(pageId) → {jQuery.Promise}

Utility function to get the title of a page ID

Parameters:
Name Type Description
pageId number
Source:
Returns:
Type
jQuery.Promise

isFavorite(pageId) → {boolean}

Check if a page ID is in the favorites array

Parameters:
Name Type Description
pageId string
Source:
Returns:

Whether the page ID is in the favorites array

Type
boolean

removeFavorite(pageId) → {Promise}

Remove a page ID from the favorites array

Parameters:
Name Type Description
pageId string
Source:
Returns:

Resolves when the page ID is removed (or is not able to be).

Type
Promise