lua.wgists.get
The http task must be running and this will block waiting on results.
Get a gist, see https://docs.github.com/en/rest/gists
opts.gid
Must be set to the gist id
opts.token
Optional token to read this gist
opts.baseurl
Can be used to overide the default of "https://api.github.com" which is set in wgists.baseurl and can also be changed globally there.
lua.wgists.list
local list=gist.list(opts)
The http task must be running and this will block waiting on results.
List some gists from github using options found in opts, see https://docs.github.com/en/rest/gists
opts.baseurl
Can be used to overide the default of "https://api.github.com" which is set in wgists.baseurl and can also be changed globally there.
opts.token
Should be set to a github access token and is required for writing data or accessing non public information.
opts.username
Is the name of a github user we wish to list gists for
opts.filter
Can be "public" to request only public gists or "starred" to request only starred gists.
opts.since
An ISO_8601 timestamp in a string and should be set if we are only interested in gists since this time.
opts.per_page
The number of results we want, the api limits this to 100 but defaults to 30. Probably a good idea to set this to 100 unless you want to deal with paging code and even then you can only get the first 3000 results.
opts.page
The page of results we are requesting, It defaults to 1 so can be omitted unless you are going to request multiple pages.
lua.wgists.parse_iso8601
seconds = wgists.parse_iso8601(text)
Parse a string in iso8601 format into a linux time ( seconds since 1970 )
lua.wgists.set
The http task must be running and this will block waiting on results.
Set a gist, see https://docs.github.com/en/rest/gists
opts.gid
Must be set to the gist id
opts.token
Token to write this gist
opts.body
Gist data
opts.baseurl
Can be used to overide the default of "https://api.github.com" which is set in wgists.baseurl and can also be changed globally there.