blob: fcfc31c4b9d1e8d6ff123d9314b0cef041fc4bd8 [file] [log] [blame]
Serge Bazanski18c1a262022-07-07 14:24:53 +02001local socket = require("socket")
2local https = require("https")
3local json = require("vendor.json")
4local lume = require("vendor.lume")
5
6local miseryURL = 'https://oodviewer.q3k.me/randomterm.json/_,'
7
8local c, r, h = https.request(miseryURL)
9if c == 200 then
10 love.thread.getChannel('misery'):push(json.decode(r))
11 print("Update finished")
12else
13 print("Update failed: " .. tostring(c) .. ": " .. tostring(r))
14end