local socket = require("socket")
local https = require("https")
local json = require("vendor.json")
local lume = require("vendor.lume")

local miseryURL = 'https://oodviewer.q3k.me/randomterm.json/_,'

local c, r, h = https.request(miseryURL)
if c == 200 then
  love.thread.getChannel('misery'):push(json.decode(r))
  print("Update finished")
else
  print("Update failed: " .. tostring(c) .. ": " .. tostring(r))
end
