Libraryless. Click here for Pure Java version (3945L/26K).
1 | sbool postServerCountToMythicalBotsXYZ(long clientID, S apiKey, int serverCount) { |
2 | S url = "https://mythicalbots.xyz/api/bot/" + clientID; |
3 | doPost_extraHeaders.set(litmap(authorization := assertNempty("API key", apiKey))); |
4 | Map map = jsonDecodeMap(print(postPage(url, server_count := serverCount))); |
5 | if (empty(mapGet(map, "success"))) |
6 | ret false with print("WARNING: mythicalbots.xyz server count updated failed"); |
7 | true; |
8 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1025828 |
Snippet name: | postServerCountToMythicalBotsXYZ |
Eternal ID of this version: | #1025828/2 |
Text MD5: | 89eb1a9e1fe37ca48da32f4b4905a8c0 |
Transpilation MD5: | 82513f828c18e1cc6c59a4a65696688f |
Author: | stefan |
Category: | javax / bots |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-10-24 13:23:25 |
Source code size: | 440 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 227 / 312 |
Version history: | 1 change(s) |
Referenced in: | [show references] |