1 | static Map<S, S> slackGetChannelIDs(S token) { |
2 | S url = "https://slack.com/api/channels.list"; |
3 | Map postData = litmap("token", token); |
4 | S data = doPostWithTimeout(postData, url, slackSetTimeout_get()); |
5 | Map map = jsonDecodeMap(data); |
6 | L<Map> channels = cast map.get("channels"); |
7 | new Map<S, S> out; |
8 | for (Map c : channels) { |
9 | S id = getString(c, "id"); |
10 | S name = getString(c, "name"); |
11 | out.put(name, id); |
12 | } |
13 | ret out; |
14 | } |
Began life as a copy of #1002121
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1002170 |
Snippet name: | slackGetChannelIDs |
Eternal ID of this version: | #1002170/1 |
Text MD5: | 1977cefd1a1ce0400ccb27d8b607db56 |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-04-02 20:15:12 |
Source code size: | 452 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 644 / 935 |
Referenced in: | [show references] |