Add fetchTables

This commit is contained in:
insweater 2015-02-05 20:02:01 +03:00
parent 681f0439a0
commit a55f47a74b

View File

@ -204,4 +204,20 @@ function GJ.fetchScores(limit, tableID)
return t return t
end end
function GJ.fetchTables()
local d = req("scores/tables/?", "keypair", false, false)
local t, f = {}
parseKeypair(d, function(k, v)
if k ~= "success" then
if k == "id" then
f = {}
table.insert(t, f)
end
f[k] = v
end
end)
return t
end
return GJ return GJ