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

15
LINES

< > BotCompany Repo | #1002717 // Run channels.list (eleu.slack.com)

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

Libraryless. Click here for Pure Java version (1181L/8K/26K).

!752

static S token;

p {
  S eleuToken = loadSecretTextFileMandatory("#1001925", "eleu-slack-token").trim();
  token = eleuToken;
  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 #1002120

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: #1002717
Snippet name: Run channels.list (eleu.slack.com)
Eternal ID of this version: #1002717/1
Text MD5: f4b387e55eb222593a5c3bad9eb667e8
Transpilation MD5: b15a2651b63734ef2182bffc605cc3f3
Author: stefan
Category:
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-02-17 04:00:58
Source code size: 423 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 684 / 673
Referenced in: [show references]