Description Usage Arguments Details Value Examples
view_gists()
summarises a user's gists in a table with the properties as
columns and a row for each gist. view_gist()
returns a list of all
properties for a single gist. browse_gist()
opens the web page for the gist
in the default browser.
1 2 3 4 5 | view_gists(user, since, n_max = 1000, ...)
view_gist(gist, ...)
browse_gist(gist, ...)
|
user |
(string, optional) The login of the user. If not specified the authenticated user is used. |
since |
(string, optional) A date & time to filter by. Must be in the
format: |
n_max |
(integer, optional) Maximum number to return. Default: |
... |
Parameters passed to |
gist |
(string) The id of the gist. |
When viewing gists, if a user is not specified the gists for the authenticated user are returned.
For more details see the GitHub API documentation:
https://docs.github.com/en/rest/reference/gists#list-gists-for-a-user
https://docs.github.com/en/rest/reference/gists#list-gists-for-the-authenticated-user
view_gists()
returns a tibble of gist properties. view_gist()
returns a list of properties for a single gist. browse_gist
opens the
default browser on the gist page and returns the URL.
Gist Properties:
id: The id for the gist
description: The description of the gist
files: For view_gists()
just the filenames are returned, for
view_gist()
a tibble of file properties is returned:
filename: The name of the file
type: The type of file
content: The file content
size: The size of the file in bytes
truncated: Whether the file content has been truncated
owner: The login if the gist's owner
public: Whether the gist is public
html_url: The address of the gist's web page.
created_at: The time and date the gist was created.
updated_at: The time and date the gist was last updated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
# View the authenticated user's gists
view_gists()
# View a specific user's gists
view_gists("ChadGoymer")
# View a specific gist
view_gist("806dca6b09a39e7b6326a0c8137583e6")
# Browse a gist
browse_gist("806dca6b09a39e7b6326a0c8137583e6")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.