Methods
(async, inner) download(subdomains, tokens, cookies, options) → {Promise.<downloadResponseObject>}
Download the list of custom emoji that have been added to the given slack instances, by default saving a json of all available relevant data. Optionally save the source images for a given user.
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
subdomains |
string | Array.<string> |
a single or list of subdomains from which to download emoji. Must match respectively to |
||||||||||||||||||||||||||||
tokens |
string | Array.<string> |
a single or list of tokens with which to authenticate. 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 singleton or arrays of emoji descriptors. Properties
|
- Source:
Example
var downloadOptions = {
save: ['username_1', 'username_2'], // Download the emoji source files for these two users
bustCache: true, // make sure this data is fresh
output: true // download the adminList to ./build
};
var downloadResults = await emojme.download('mySubdomain', 'myToken', 'myCookie', downloadOptions);
console.log(downloadResults);
// {
// mySubdomain: {
// emojiList: [
// { name: 'emoji-from-mySubdomain', ... },
// ...
// ],
// saveResults: [
// './build/mySubdomain/username_1/an_emoji.jpg',
// './build/mySubdomain/username_1/another_emoji.gif',
// ... all of username_1's emoji
// './build/mySubdomain/username_2/some_emoji.jpg',
// './build/mySubdomain/username_2/some_other_emoji.gif',
// ... all of username_2's emoji
// ]
// }
// }
Type Definitions
downloadResponseObject :object
The download 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: