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 |
Returns:
Resolves when the page ID is added (or is not able to be).
- Type
- Promise
getAllFavoritesDetails() → {Promise}
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 |
Returns:
- Type
- Promise
getFavoriteTitle(pageId) → {jQuery.Promise}
Utility function to get the title of a page ID
Parameters:
Name | Type | Description |
---|---|---|
pageId |
number |
Returns:
- Type
- jQuery.Promise
isFavorite(pageId) → {boolean}
Check if a page ID is in the favorites array
Parameters:
Name | Type | Description |
---|---|---|
pageId |
string |
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 |
Returns:
Resolves when the page ID is removed (or is not able to be).
- Type
- Promise