View Source GitHub.Gists (GitHub REST API Client v0.0.4)

Provides API endpoints related to gists

Link to this section Summary

Link to this section Functions

Link to this function

check_is_starred(gist_id, opts \\ [])

View Source
@spec check_is_starred(
  String.t(),
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Check if a gist is starred

resources

Resources

Link to this function

create(body, opts \\ [])

View Source
@spec create(
  map(),
  keyword()
) :: {:ok, GitHub.Gist.simple()} | {:error, GitHub.Error.t()}

Create a gist

resources

Resources

Link to this function

create_comment(gist_id, body, opts \\ [])

View Source
@spec create_comment(String.t(), map(), keyword()) ::
  {:ok, GitHub.Gist.Comment.t()} | {:error, GitHub.Error.t()}

Create a gist comment

resources

Resources

Link to this function

delete(gist_id, opts \\ [])

View Source
@spec delete(
  String.t(),
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Delete a gist

resources

Resources

Link to this function

delete_comment(gist_id, comment_id, opts \\ [])

View Source
@spec delete_comment(String.t(), integer(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

Delete a gist comment

resources

Resources

Link to this function

fork(gist_id, opts \\ [])

View Source
@spec fork(
  String.t(),
  keyword()
) :: {:ok, GitHub.BaseGist.t()} | {:error, GitHub.Error.t()}

Fork a gist

resources

Resources

Link to this function

get(gist_id, opts \\ [])

View Source
@spec get(
  String.t(),
  keyword()
) :: {:ok, GitHub.Gist.simple()} | {:error, GitHub.Error.t()}

Get a gist

resources

Resources

Link to this function

get_comment(gist_id, comment_id, opts \\ [])

View Source
@spec get_comment(String.t(), integer(), keyword()) ::
  {:ok, GitHub.Gist.Comment.t()} | {:error, GitHub.Error.t()}

Get a gist comment

resources

Resources

Link to this function

get_revision(gist_id, sha, opts \\ [])

View Source
@spec get_revision(String.t(), String.t(), keyword()) ::
  {:ok, GitHub.Gist.simple()} | {:error, GitHub.Error.t()}

Get a gist revision

resources

Resources

@spec list(keyword()) :: {:ok, [GitHub.BaseGist.t()]} | {:error, GitHub.Error.t()}

List gists for the authenticated user

options

Options

  • since (String.t()): Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_comments(gist_id, opts \\ [])

View Source
@spec list_comments(
  String.t(),
  keyword()
) :: {:ok, [GitHub.Gist.Comment.t()]} | {:error, GitHub.Error.t()}

List gist comments

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_commits(gist_id, opts \\ [])

View Source
@spec list_commits(
  String.t(),
  keyword()
) :: {:ok, [GitHub.Gist.Commit.t()]} | {:error, GitHub.Error.t()}

List gist commits

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_for_user(username, opts \\ [])

View Source
@spec list_for_user(
  String.t(),
  keyword()
) :: {:ok, [GitHub.BaseGist.t()]} | {:error, GitHub.Error.t()}

List gists for a user

options

Options

  • since (String.t()): Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_forks(gist_id, opts \\ [])

View Source
@spec list_forks(
  String.t(),
  keyword()
) :: {:ok, [GitHub.Gist.simple()]} | {:error, GitHub.Error.t()}

List gist forks

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

@spec list_public(keyword()) ::
  {:ok, [GitHub.BaseGist.t()]} | {:error, GitHub.Error.t()}

List public gists

options

Options

  • since (String.t()): Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_starred(opts \\ [])

View Source
@spec list_starred(keyword()) ::
  {:ok, [GitHub.BaseGist.t()]} | {:error, GitHub.Error.t()}

List starred gists

options

Options

  • since (String.t()): Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

star(gist_id, opts \\ [])

View Source
@spec star(
  String.t(),
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Star a gist

resources

Resources

Link to this function

unstar(gist_id, opts \\ [])

View Source
@spec unstar(
  String.t(),
  keyword()
) :: :ok | {:error, GitHub.Error.t()}

Unstar a gist

resources

Resources

Link to this function

update(gist_id, body, opts \\ [])

View Source
@spec update(String.t(), map() | nil, keyword()) ::
  {:ok, GitHub.Gist.simple()} | {:error, GitHub.Error.t()}

Update a gist

resources

Resources

Link to this function

update_comment(gist_id, comment_id, body, opts \\ [])

View Source
@spec update_comment(String.t(), integer(), map(), keyword()) ::
  {:ok, GitHub.Gist.Comment.t()} | {:error, GitHub.Error.t()}

Update a gist comment

resources

Resources