View Source GitHub.Packages (GitHub REST API Client v0.0.1)

Provides API endpoints related to packages

Link to this section Summary

Functions

List package versions for a package owned by the authenticated user

List package versions for a package owned by an organization

List packages for the authenticated user's namespace

List packages for an organization

Link to this section Functions

Link to this function

delete_package_for_authenticated_user(package_type, package_name, opts \\ [])

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

Delete a package for the authenticated user

resources

Resources

Link to this function

delete_package_for_org(org, package_type, package_name, opts \\ [])

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

Delete a package for an organization

resources

Resources

Link to this function

delete_package_for_user(username, package_type, package_name, opts \\ [])

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

Delete a package for a user

resources

Resources

Link to this function

delete_package_version_for_authenticated_user(package_type, package_name, package_version_id, opts \\ [])

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

Delete a package version for the authenticated user

resources

Resources

Link to this function

delete_package_version_for_org(org, package_type, package_name, package_version_id, opts \\ [])

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

Delete package version for an organization

resources

Resources

Link to this function

delete_package_version_for_user(username, package_type, package_name, package_version_id, opts \\ [])

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

Delete package version for a user

resources

Resources

Link to this function

get_all_package_versions_for_package_owned_by_authenticated_user(package_type, package_name, opts \\ [])

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

List package versions for a package owned by the authenticated user

options

Options

  • page (integer): Page number of the results to fetch.
  • per_page (integer): The number of results per page (max 100).
  • state (String.t()): The state of the package, either active or deleted.

resources

Resources

Link to this function

get_all_package_versions_for_package_owned_by_org(org, package_type, package_name, opts \\ [])

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

List package versions for a package owned by an organization

options

Options

  • page (integer): Page number of the results to fetch.
  • per_page (integer): The number of results per page (max 100).
  • state (String.t()): The state of the package, either active or deleted.

resources

Resources

Link to this function

get_all_package_versions_for_package_owned_by_user(username, package_type, package_name, opts \\ [])

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

List package versions for a package owned by a user

resources

Resources

Link to this function

get_package_for_authenticated_user(package_type, package_name, opts \\ [])

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

Get a package for the authenticated user

resources

Resources

Link to this function

get_package_for_organization(org, package_type, package_name, opts \\ [])

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

Get a package for an organization

resources

Resources

Link to this function

get_package_for_user(username, package_type, package_name, opts \\ [])

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

Get a package for a user

resources

Resources

Link to this function

get_package_version_for_authenticated_user(package_type, package_name, package_version_id, opts \\ [])

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

Get a package version for the authenticated user

resources

Resources

Link to this function

get_package_version_for_organization(org, package_type, package_name, package_version_id, opts \\ [])

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

Get a package version for an organization

resources

Resources

Link to this function

get_package_version_for_user(username, package_type, package_name, package_version_id, opts \\ [])

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

Get a package version for a user

resources

Resources

Link to this function

list_packages_for_authenticated_user(opts \\ [])

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

List packages for the authenticated user's namespace

options

Options

  • package_type (String.t()): The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • visibility (String.t()): The selected visibility of the packages. This parameter is optional and only filters an existing result set.

The internal visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems internal is synonymous with private. For the list of GitHub Packages registries that support granular permissions, see "About permissions for GitHub Packages."

resources

Resources

Link to this function

list_packages_for_organization(org, opts \\ [])

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

List packages for an organization

options

Options

  • package_type (String.t()): The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • visibility (String.t()): The selected visibility of the packages. This parameter is optional and only filters an existing result set.

The internal visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems internal is synonymous with private. For the list of GitHub Packages registries that support granular permissions, see "About permissions for GitHub Packages."

resources

Resources

Link to this function

list_packages_for_user(username, opts \\ [])

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

List packages for a user

options

Options

  • package_type (String.t()): The type of supported package. Packages in GitHub's Gradle registry have the type maven. Docker images pushed to GitHub's Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub's Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • visibility (String.t()): The selected visibility of the packages. This parameter is optional and only filters an existing result set.

The internal visibility is only supported for GitHub Packages registries that allow for granular permissions. For other ecosystems internal is synonymous with private. For the list of GitHub Packages registries that support granular permissions, see "About permissions for GitHub Packages."

resources

Resources

Link to this function

restore_package_for_authenticated_user(package_type, package_name, opts \\ [])

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

Restore a package for the authenticated user

options

Options

  • token (String.t()): package token

resources

Resources

Link to this function

restore_package_for_org(org, package_type, package_name, opts \\ [])

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

Restore a package for an organization

options

Options

  • token (String.t()): package token

resources

Resources

Link to this function

restore_package_for_user(username, package_type, package_name, opts \\ [])

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

Restore a package for a user

options

Options

  • token (String.t()): package token

resources

Resources

Link to this function

restore_package_version_for_authenticated_user(package_type, package_name, package_version_id, opts \\ [])

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

Restore a package version for the authenticated user

resources

Resources

Link to this function

restore_package_version_for_org(org, package_type, package_name, package_version_id, opts \\ [])

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

Restore package version for an organization

resources

Resources

Link to this function

restore_package_version_for_user(username, package_type, package_name, package_version_id, opts \\ [])

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

Restore package version for a user

resources

Resources