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

18
LINES

< > BotCompany Repo | #1012244 // getVersionsOfSnippet - lists in reverse order

JavaX fragment (include)

1  
static L<SnippetVersion> getVersionsOfSnippet(S snippetID) {
2  
  snippetID = fsI(snippetID);
3  
  S html = loadPage(tb_mainServer() + "/tb/versions.php?id=" + psI(snippetID) + standardCredentials());
4  
  LL<S> rows = new TableFinder(html).rows();
5  
  L<S> header = first(rows);
6  
  new L<SnippetVersion> versions;
7  
  for (L<S> row : dropFirst(rows)) {
8  
    SS data = toMapAccordingToHeader(row, header);
9  
    printStruct(data);
10  
    versions.add(nu(SnippetVersion,
11  
      +snippetID,
12  
      versionID := parseLongOpt(getParamFromURL(html_firstLinkURL(data.get("Previous value")), "v_id")),
13  
      previousMD5 := data.get("Previous MD5"),
14  
      change := data.get("Change"),
15  
      date := data.get("Date"));
16  
  }
17  
  ret versions;
18  
}

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

No comments. add comment

Snippet ID: #1012244
Snippet name: getVersionsOfSnippet - lists in reverse order
Eternal ID of this version: #1012244/9
Text MD5: 034bec7e8dc6b21fa98eb30772b89e99
Author: stefan
Category: javax / snippets
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-03 15:34:02
Source code size: 727 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 375 / 605
Version history: 8 change(s)
Referenced in: [show references]