15 lines
380 B
Lua
15 lines
380 B
Lua
local socket = require("socket")
|
|
local http = require("socket.http")
|
|
local json = require("vendor.json")
|
|
local lume = require("vendor.lume")
|
|
|
|
local miseryURL = 'http://oodviewer.q3k.me/randomterm.json/_,'
|
|
|
|
local r, c, h = http.request(miseryURL)
|
|
if c == 200 then
|
|
love.thread.getChannel('misery'):push(json.decode(r))
|
|
print("Update finished")
|
|
else
|
|
print("Update failed")
|
|
end
|