Libraryless. Click here for Pure Java version (920L/7K/22K).
1 | !752 |
2 | |
3 | static S token; |
4 | |
5 | p { |
6 | token = loadSecretTextFileMandatory("#1001889", "relp-slack-botstuff-token").trim(); |
7 | S url = "https://slack.com/api/channels.list"; |
8 | Map postData = litmap("token", token); |
9 | S data = doPost(postData, url); |
10 | print(data); |
11 | Map map = jsonDecodeMap(data); |
12 | L<Map> channels = cast map.get("channels"); |
13 | for (Map c : channels) { |
14 | S name = getString(c, "name"); |
15 | L members = cast c.get("members"); |
16 | print("Channel " + name + " members: " + l(members)); |
17 | } |
18 | } |
Began life as a copy of #1002120
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1002121 |
Snippet name: | Get member counts of all channels (relp.slack.com) |
Eternal ID of this version: | #1002121/1 |
Text MD5: | 59ae0c4b4d4f7e6f25c20a45064f676e |
Transpilation MD5: | 9ec5ed0307e9eae2855909c750123195 |
Author: | stefan |
Category: | |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-12-19 19:24:18 |
Source code size: | 515 bytes / 18 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 618 / 705 |
Referenced in: | [show references] |