Add fetchTables
This commit is contained in:
parent
681f0439a0
commit
a55f47a74b
16
gamejolt.lua
16
gamejolt.lua
@ -204,4 +204,20 @@ function GJ.fetchScores(limit, tableID)
|
||||
return t
|
||||
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
|
Reference in New Issue
Block a user