Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

14
LINES

< > BotCompany Repo | #1002120 // Run channels.list (devchannel.slack.com)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (1062L/7K/24K).

!752

static S token;

p {
  token = devChannelToken();
  S url = "https://slack.com/api/channels.list";
  Map postData = litmap("token", token);
  S data = doPost(postData, url);
  Map map = jsonDecodeMap(data);
  L<Map> channels = cast map.get("channels");
  for (Map c : channels)
    print(c.get("id") + " " + c.get("name"));
}

Author comment

Began life as a copy of #1001938

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: #1002120
Snippet name: Run channels.list (devchannel.slack.com)
Eternal ID of this version: #1002120/1
Text MD5: 51d061d376df3351ee8fdf95ce2a8c8c
Transpilation MD5: 227991a878bd18e73cd80f6ea5f53661
Author: stefan
Category:
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-01-04 19:07:53
Source code size: 346 bytes / 14 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 629 / 642
Referenced in: #1002121 - Get member counts of all channels (relp.slack.com)
#1002717 - Run channels.list (eleu.slack.com)
#3000382 - Answer for ferdie (>> t = 1, f = 0)