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

10
LINES

< > BotCompany Repo | #1026234 // viber_sendMessage

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3990L/27K).

static Map viber_sendMessage(S token, S senderName, S receiverViperID, S text) {
  ret jsonDecodeMap(doPostJSONWithHeaders(
    jsonEncode(litmap(
      receiver := receiverViperID,
      type := "text",
      "sender.name" := senderName,
      +text)),
    "https://chatapi.viber.com/pa/send_message",
    "X-Viber-Auth-Token" := token));
}

Author comment

Began life as a copy of #1026231

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: #1026234
Snippet name: viber_sendMessage
Eternal ID of this version: #1026234/2
Text MD5: 61e1c55ddbcad9113fc8cac72c1dab78
Transpilation MD5: f186eb745e2e0cc51f186e9c507b92dc
Author: stefan
Category: javax / viber
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-12-07 14:00:07
Source code size: 350 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 190 / 284
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)