GitHub::REST::Gists
This module is specifically for interacting with the Gists endpoints GitHub offers us to use. see GitHub Gists endpoints
Instance methods
Creates a gist on the auth user's account.
payload = GistCreationPayload.new(
description: "This is a description",
public: true,
files: {
"test.cr" => GistCreationFilePayload.new(content: "This is some content"),
}
)
client.create_gist(payload)
NOTE: This will return the public repositories only if it wasn't obvious already...
Get a revision of a gist by it's ID and sha
List public gists sorted by most recently updated to least recently updated. NOTE: With pagination, you can fetch up to 3000 gists. For example you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page.
gists = client.get_public_gists(
Time.local(2018, 3, 8, 22, 5, 13, location: Time::Location.load("Europe/Berlin"))
)
List the auth user's starred gists TODO check if since can be null
Allows you to list the commits of a gist by it's ID
Allows you to update or delete a gist file and rename gist files Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. TODO: Look into the different new fields that might appear