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

20
LINES

< > BotCompany Repo | #1000621 // getSnippetComments

JavaX fragment (include)

static class Comment {
  int user_id;
  String user_name;
  String text;
}

static List<Comment> getSnippetComments(String snippetID) ctex {
  Object json = jsonDecode(loadPage(tb_mainServer() + "/tb-int/get-comments.php?id=" + parseSnippetID(snippetID)));
  //System.out.println("json: " + json);
  new List<Comment> list;
  for (Object _row : (List) json) {
    Map row = (Map) _row;
    new Comment c;
    c.user_id = Integer.parseInt((String) row.get("author"));
    c.user_name = (String) row.get("user_name");
    c.text = (String) row.get("text");
    list.add(c);
  }
  return list;
}
  

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

2 comment(s) hidden. show

Snippet ID: #1000621
Snippet name: getSnippetComments
Eternal ID of this version: #1000621/2
Text MD5: 6fddce6d8e649abb6ad20c88d46ef866
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-26 13:24:04
Source code size: 615 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 1097 / 1378
Version history: 1 change(s)
Referenced in: [show references]