Posted 03 January 2013 - 03:03 AM
this API is the first out of a set to make the user experience on github hosted apps better
a Downloader will follow and probably also a crash reporter
but lets get to the interesting part
Note that this API will not download any code for you
it will only check if the user is using the latest commit
using this API is very simple and looking at this example should probably tell you everything you need to know:
the json parsing in this API is done by David Kolf's JSON module which i highly recommend using for tasks like this
Download
Changelog
a Downloader will follow and probably also a crash reporter
but lets get to the interesting part
Note that this API will not download any code for you
it will only check if the user is using the latest commit
using this API is very simple and looking at this example should probably tell you everything you need to know:
local updater = dofile("lib/updater.lua")
local function update()
print("done")
end
updater.new() -- this will check for any updates for the updater
updater.update(update, "Kolpa", "lol-pro-spectator") -- first argument is the function to be executed in case of an update second is the username and last is the repostery where the program is located
the json parsing in this API is done by David Kolf's JSON module which i highly recommend using for tasks like this
Download
Changelog