Skip to content

Instantly share code, notes, and snippets.

@CPsridharCP
Created August 29, 2019 05:28
Show Gist options
  • Save CPsridharCP/bdc8b72e83abfa4ad6ff3b0fc426848f to your computer and use it in GitHub Desktop.
Save CPsridharCP/bdc8b72e83abfa4ad6ff3b0fc426848f to your computer and use it in GitHub Desktop.
misty.RegisterTimerEvent("keepActive", 18000, true);
function _keepActive() {
misty.SendExternalRequest("POST", "https://ps.pndsn.com/publish/<publish-key>/<subscribe-key>/0/<pubnub-channel>/myCallback", null, null, "{}", false, false, "", "application/json");
}
misty.SendExternalRequest("GET", "https://ps.pndsn.com/subscribe/<subscribe-key>/<pubnub-channel>/0/0?uuid=<any-user-name>", null, null, "{}", false, false, "", "application/json", "_pubNubSubscribe");
function _pubNubSubscribe(data)
{
outputExt(data.Result.ResponseObject.Data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment