favorites

Methods

(async, inner) favorites(subdomains, tokens, cookies, options) → {Promise.<favoritesResponseObject>}

Get the contents of the "Frequenly Used" box for your specified user

Parameters:
Name Type Description
subdomains string | Array.<string>

a single or list of subdomains from which to analyze emoji. Must match respectively to tokens and cookies.

tokens string | Array.<string>

a single or list of tokens to add emoji to. Must match respectively to subdomains and cookies.

cookies string | Array.<string>

a single or list of cookies used to authenticate access to the given subdomain. Must match respectively to subdomains and tokens.

options object

contains options on what to present

Properties
Name Type Attributes Description
lite Number <optional>

do not attempt to marry favorites with complete adminlist content. Results will contain only emoji name and usage count.

top Number <optional>

(verbose cli only) count of top n emoji contriubtors you would like to retrieve user statistics on

usage Number <optional>

(verbose cli only) print not just the list of favorite emoji, but their usage count

bustCache boolean <optional>

if true, ignore any adminList younger than 24 hours and repull slack instance's existing emoji. Can be useful for making options.avoidCollisions more accurate

output boolean <optional>

if false, no files will be written during execution. Prevents saving of adminList for future use, as well as the writing of log files

verbose boolean <optional>

if true, all messages will be written to stdout in addition to combined log file.

Source:
Example
var favoritesResult = await emojme.favorites('mySubdomain', 'myToken', 'myCookie', {});
console.log(favoritesResult);
// {
//   mySubdomain: {
//     favoritesResult: {
//         user: '{myToken's user}',
//         favoriteEmoji: [
//            emojiName,
//            ...
//         ],
//         favoriteEmojiAdminList: [
//           {emojiName}: {adminList-style emoji object, with additional `usage` value}
//           ...
//         ],
//       }
//   }
// }

Type Definitions

favoritesResponseObject :object

The user-specific favorites response object, like other response objects, is organized by input subdomain.

Properties:
Name Type Description
subdomain object

each subdomain passed in to add will appear as a key in the response

Properties
Name Type Description
favoritesResult.user string

the username associated with the given cookie token

favoritesResult.favoriteEmoji Array.<string>

the list of 'favorite' emoji as deemed by slack, in desc sorted order

favoritesResult.favoriteEmojiAdminList Array.<object>

an array of emoji objects, as organized by emojiAdminList

Source: