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

14
LINES

< > BotCompany Repo | #1003014 // Run channels.list (devchat-test)

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

Libraryless. Click here for Pure Java version (1206L/9K/28K).

!752

static S token;

p {
  token = loadSecretTextFileMandatory("#1001925", "devchat-test-token").trim();
  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 #1002717

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: #1003014
Snippet name: Run channels.list (devchat-test)
Eternal ID of this version: #1003014/1
Text MD5: 3359df3be46dfc9cfc43af7e33230083
Transpilation MD5: 3b11f3015271ee35570c7f49a49dbbbf
Author: stefan
Category:
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-04-18 22:31:57
Source code size: 397 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 637 / 627
Referenced in: #3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)