diff options
-rw-r--r-- | shop.lua | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,4 +1,5 @@ -sres =textutils.unserializeJSON( http.post("https://krist.dev/ws/start","").readAll()) +key=assert(settings.get"krist.pkey","please set private key") +sres =textutils.unserializeJSON( http.post("https://krist.dev/ws/start","privatekey="..key).readAll()) assert(sres.ok,"not ok") ws = assert(http.websocket(sres.url)) @@ -9,12 +10,10 @@ function sendws(t) nextid = nextid + 1 return ws.send(textutils.serializeJSON(t)) end -sendws { type="get_subscription_level" } while true do msgtxt = assert(ws.receive(),"ws error") msg = textutils.unserializeJSON(msgtxt) - print(msg.type) if msg.type ~= "keepalive" then print(msgtxt) end end |