Skip to content
This repository has been archived by the owner on Dec 17, 2018. It is now read-only.

Latest commit

 

History

History
33 lines (25 loc) · 1.27 KB

emoji-list.md

File metadata and controls

33 lines (25 loc) · 1.27 KB

emoji.list

This method lists the custom emoji for a team.

Official documentation https://api.slack.com/methods/emoji.list
Payload class EmojiListPayload
PayloadResponse class EmojiListPayloadResponse

Usage

$payload   = new EmojiListPayload();
$apiClient = new ApiClient('your-slack-token-here');
$response  = $apiClient->send($payload);

if ($response->isOk()) {
    foreach ($response->getEmoji() as $name => $urlOrAlias) {
        echo $name; // eg. 'shipit'
        echo $urlOrAlias; // eg. 'alias:squirrel'
    }
} else {
    // something went wrong, but what?
    
    // simple error (Slack's error message)
    echo $response->getError();
    
    // explained error (Slack's explanation of the error, according to the documentation)
    echo $response->getErrorExplanation();
}