Methods
(async, inner) userStats(subdomains, tokens, cookies, options) → {Promise.<userStatsResponseObject>}
Get a few useful-ish statistics for either specific users, or the top-n emoji creators
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
subdomains |
string | Array.<string> |
a single or list of subdomains to analyze. Must match respectively to |
||||||||||||||||||||||||
tokens |
string | Array.<string> |
a single or list of tokens to add emoji to. Must match respectively to |
||||||||||||||||||||||||
cookies |
string | Array.<string> |
a single or list of cookies used to authenticate access to the given subdomain. Must match respectively to |
||||||||||||||||||||||||
options |
object |
contains options for what stats to present Properties
|
- Source:
Example
var userStatsOptions = {
user: ['username_1', 'username_2'] // get me some info on these two users
};
var userStatsResults = await emojme.userStats('mySubdomain', 'myToken', 'myCookie', userStatsOptions);
console.log(userStatsResults);
// {
// mySubdomain: {
// userStatsResults: [
// {
// user: 'username_1',
// userEmoji: [{ all username_1's emoji }],
// subdomain: mySubdomain,
// originalCount: x,
// aliasCount: y,
// totalCount: x + y,
// percentage: (x + y) / mySubdomain's total emoji count
// },
// {
// user: 'username_2',
// userEmoji: [{ all username_2's emoji }],
// subdomain: mySubdomain,
// originalCount: x,
// aliasCount: y,
// totalCount: x + y,
// percentage: (x + y) / mySubdomain's total emoji count
// }
// ]
// }
// }
Type Definitions
userStatsResponseObject :object
The user-specific userStats 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
|
- Source: