1
0
mirror of https://github.com/kepler155c/opus synced 2024-06-16 10:19:59 +00:00

add git api key support

This commit is contained in:
kepler155c@gmail.com 2019-01-12 10:17:56 -05:00
parent 25031bfdc2
commit cb5f690cf4

View File

@ -5,6 +5,10 @@ local TREE_URL = 'https://api.github.com/repos/%s/%s/git/trees/%s?recursive=1'
local FILE_URL = 'https://raw.githubusercontent.com/%s/%s/%s/%s' local FILE_URL = 'https://raw.githubusercontent.com/%s/%s/%s/%s'
local git = { } local git = { }
if _G._GIT_API_KEY then
TREE_URL = TREE_URL .. '&access_token=' .. _G._GIT_API_KEY
end
function git.list(repository) function git.list(repository)
local t = Util.split(repository, '(.-)/') local t = Util.split(repository, '(.-)/')