Struct roctogen::endpoints::packages::Packages [−][src]
pub struct Packages<'api> { /* fields omitted */ }
Implementations
pub async fn delete_package_for_authenticated_user_async(
&self,
package_type: &str,
package_name: &str
) -> Result<(), PackagesDeletePackageForAuthenticatedUserError>
pub async fn delete_package_for_authenticated_user_async(
&self,
package_type: &str,
package_name: &str
) -> Result<(), PackagesDeletePackageForAuthenticatedUserError>
Delete a package for the authenticated user
Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
To use this endpoint, you must authenticate using an access token with the packages:read
and packages:delete
scopes.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for delete_package_for_authenticated_user
pub fn delete_package_for_authenticated_user(
&self,
package_type: &str,
package_name: &str
) -> Result<(), PackagesDeletePackageForAuthenticatedUserError>
pub fn delete_package_for_authenticated_user(
&self,
package_type: &str,
package_name: &str
) -> Result<(), PackagesDeletePackageForAuthenticatedUserError>
Delete a package for the authenticated user
Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
To use this endpoint, you must authenticate using an access token with the packages:read
and packages:delete
scopes.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for delete_package_for_authenticated_user
pub async fn delete_package_for_org_async(
&self,
package_type: &str,
package_name: &str,
org: &str
) -> Result<(), PackagesDeletePackageForOrgError>
pub async fn delete_package_for_org_async(
&self,
package_type: &str,
package_name: &str,
org: &str
) -> Result<(), PackagesDeletePackageForOrgError>
Delete a package for an organization
Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read
and packages:delete
scopes. In addition:
- If
package_type
is notcontainer
, your token must also include therepo
scope. - If
package_type
iscontainer
, you must also have admin permissions to the container you want to delete.
GitHub API docs for delete_package_for_org
pub fn delete_package_for_org(
&self,
package_type: &str,
package_name: &str,
org: &str
) -> Result<(), PackagesDeletePackageForOrgError>
pub fn delete_package_for_org(
&self,
package_type: &str,
package_name: &str,
org: &str
) -> Result<(), PackagesDeletePackageForOrgError>
Delete a package for an organization
Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read
and packages:delete
scopes. In addition:
- If
package_type
is notcontainer
, your token must also include therepo
scope. - If
package_type
iscontainer
, you must also have admin permissions to the container you want to delete.
GitHub API docs for delete_package_for_org
pub async fn delete_package_for_user_async(
&self,
package_type: &str,
package_name: &str,
username: &str
) -> Result<(), PackagesDeletePackageForUserError>
pub async fn delete_package_for_user_async(
&self,
package_type: &str,
package_name: &str,
username: &str
) -> Result<(), PackagesDeletePackageForUserError>
Delete a package for a user
Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
To use this endpoint, you must authenticate using an access token with the packages:read
and packages:delete
scopes. In addition:
- If
package_type
is notcontainer
, your token must also include therepo
scope. - If
package_type
iscontainer
, you must also have admin permissions to the container you want to delete.
GitHub API docs for delete_package_for_user
pub fn delete_package_for_user(
&self,
package_type: &str,
package_name: &str,
username: &str
) -> Result<(), PackagesDeletePackageForUserError>
pub fn delete_package_for_user(
&self,
package_type: &str,
package_name: &str,
username: &str
) -> Result<(), PackagesDeletePackageForUserError>
Delete a package for a user
Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.
To use this endpoint, you must authenticate using an access token with the packages:read
and packages:delete
scopes. In addition:
- If
package_type
is notcontainer
, your token must also include therepo
scope. - If
package_type
iscontainer
, you must also have admin permissions to the container you want to delete.
GitHub API docs for delete_package_for_user
pub async fn delete_package_version_for_authenticated_user_async(
&self,
package_type: &str,
package_name: &str,
package_version_id: i32
) -> Result<(), PackagesDeletePackageVersionForAuthenticatedUserError>
pub async fn delete_package_version_for_authenticated_user_async(
&self,
package_type: &str,
package_name: &str,
package_version_id: i32
) -> Result<(), PackagesDeletePackageVersionForAuthenticatedUserError>
Delete a package version for the authenticated user
Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read
and packages:delete
scopes.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for delete_package_version_for_authenticated_user
pub fn delete_package_version_for_authenticated_user(
&self,
package_type: &str,
package_name: &str,
package_version_id: i32
) -> Result<(), PackagesDeletePackageVersionForAuthenticatedUserError>
pub fn delete_package_version_for_authenticated_user(
&self,
package_type: &str,
package_name: &str,
package_version_id: i32
) -> Result<(), PackagesDeletePackageVersionForAuthenticatedUserError>
Delete a package version for the authenticated user
Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read
and packages:delete
scopes.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for delete_package_version_for_authenticated_user
pub async fn delete_package_version_for_org_async(
&self,
package_type: &str,
package_name: &str,
org: &str,
package_version_id: i32
) -> Result<(), PackagesDeletePackageVersionForOrgError>
pub async fn delete_package_version_for_org_async(
&self,
package_type: &str,
package_name: &str,
org: &str,
package_version_id: i32
) -> Result<(), PackagesDeletePackageVersionForOrgError>
Delete package version for an organization
Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read
and packages:delete
scopes. In addition:
- If
package_type
is notcontainer
, your token must also include therepo
scope. - If
package_type
iscontainer
, you must also have admin permissions to the container you want to delete.
GitHub API docs for delete_package_version_for_org
pub fn delete_package_version_for_org(
&self,
package_type: &str,
package_name: &str,
org: &str,
package_version_id: i32
) -> Result<(), PackagesDeletePackageVersionForOrgError>
pub fn delete_package_version_for_org(
&self,
package_type: &str,
package_name: &str,
org: &str,
package_version_id: i32
) -> Result<(), PackagesDeletePackageVersionForOrgError>
Delete package version for an organization
Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read
and packages:delete
scopes. In addition:
- If
package_type
is notcontainer
, your token must also include therepo
scope. - If
package_type
iscontainer
, you must also have admin permissions to the container you want to delete.
GitHub API docs for delete_package_version_for_org
pub async fn delete_package_version_for_user_async(
&self,
package_type: &str,
package_name: &str,
username: &str,
package_version_id: i32
) -> Result<(), PackagesDeletePackageVersionForUserError>
pub async fn delete_package_version_for_user_async(
&self,
package_type: &str,
package_name: &str,
username: &str,
package_version_id: i32
) -> Result<(), PackagesDeletePackageVersionForUserError>
Delete package version for a user
Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
To use this endpoint, you must authenticate using an access token with the packages:read
and packages:delete
scopes. In addition:
- If
package_type
is notcontainer
, your token must also include therepo
scope. - If
package_type
iscontainer
, you must also have admin permissions to the container you want to delete.
GitHub API docs for delete_package_version_for_user
pub fn delete_package_version_for_user(
&self,
package_type: &str,
package_name: &str,
username: &str,
package_version_id: i32
) -> Result<(), PackagesDeletePackageVersionForUserError>
pub fn delete_package_version_for_user(
&self,
package_type: &str,
package_name: &str,
username: &str,
package_version_id: i32
) -> Result<(), PackagesDeletePackageVersionForUserError>
Delete package version for a user
Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.
To use this endpoint, you must authenticate using an access token with the packages:read
and packages:delete
scopes. In addition:
- If
package_type
is notcontainer
, your token must also include therepo
scope. - If
package_type
iscontainer
, you must also have admin permissions to the container you want to delete.
GitHub API docs for delete_package_version_for_user
pub async fn get_all_package_versions_for_package_owned_by_authenticated_user_async(
&self,
package_type: &str,
package_name: &str,
query_params: Option<impl Into<PackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserParams<'api>>>
) -> Result<Vec<PackageVersion>, PackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserError>
pub async fn get_all_package_versions_for_package_owned_by_authenticated_user_async(
&self,
package_type: &str,
package_name: &str,
query_params: Option<impl Into<PackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserParams<'api>>>
) -> Result<Vec<PackageVersion>, PackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserError>
Get all package versions for a package owned by the authenticated user
Returns all package versions for a package owned by the authenticated user.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for get_all_package_versions_for_package_owned_by_authenticated_user
pub fn get_all_package_versions_for_package_owned_by_authenticated_user(
&self,
package_type: &str,
package_name: &str,
query_params: Option<impl Into<PackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserParams<'api>>>
) -> Result<Vec<PackageVersion>, PackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserError>
pub fn get_all_package_versions_for_package_owned_by_authenticated_user(
&self,
package_type: &str,
package_name: &str,
query_params: Option<impl Into<PackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserParams<'api>>>
) -> Result<Vec<PackageVersion>, PackagesGetAllPackageVersionsForPackageOwnedByAuthenticatedUserError>
Get all package versions for a package owned by the authenticated user
Returns all package versions for a package owned by the authenticated user.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for get_all_package_versions_for_package_owned_by_authenticated_user
pub async fn get_all_package_versions_for_package_owned_by_org_async(
&self,
package_type: &str,
package_name: &str,
org: &str,
query_params: Option<impl Into<PackagesGetAllPackageVersionsForPackageOwnedByOrgParams<'api>>>
) -> Result<Vec<PackageVersion>, PackagesGetAllPackageVersionsForPackageOwnedByOrgError>
pub async fn get_all_package_versions_for_package_owned_by_org_async(
&self,
package_type: &str,
package_name: &str,
org: &str,
query_params: Option<impl Into<PackagesGetAllPackageVersionsForPackageOwnedByOrgParams<'api>>>
) -> Result<Vec<PackageVersion>, PackagesGetAllPackageVersionsForPackageOwnedByOrgError>
Get all package versions for a package owned by an organization
Returns all package versions for a package owned by an organization.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for get_all_package_versions_for_package_owned_by_org
pub fn get_all_package_versions_for_package_owned_by_org(
&self,
package_type: &str,
package_name: &str,
org: &str,
query_params: Option<impl Into<PackagesGetAllPackageVersionsForPackageOwnedByOrgParams<'api>>>
) -> Result<Vec<PackageVersion>, PackagesGetAllPackageVersionsForPackageOwnedByOrgError>
pub fn get_all_package_versions_for_package_owned_by_org(
&self,
package_type: &str,
package_name: &str,
org: &str,
query_params: Option<impl Into<PackagesGetAllPackageVersionsForPackageOwnedByOrgParams<'api>>>
) -> Result<Vec<PackageVersion>, PackagesGetAllPackageVersionsForPackageOwnedByOrgError>
Get all package versions for a package owned by an organization
Returns all package versions for a package owned by an organization.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for get_all_package_versions_for_package_owned_by_org
pub async fn get_all_package_versions_for_package_owned_by_user_async(
&self,
package_type: &str,
package_name: &str,
username: &str
) -> Result<Vec<PackageVersion>, PackagesGetAllPackageVersionsForPackageOwnedByUserError>
pub async fn get_all_package_versions_for_package_owned_by_user_async(
&self,
package_type: &str,
package_name: &str,
username: &str
) -> Result<Vec<PackageVersion>, PackagesGetAllPackageVersionsForPackageOwnedByUserError>
Get all package versions for a package owned by a user
Returns all package versions for a public package owned by a specified user.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for get_all_package_versions_for_package_owned_by_user
pub fn get_all_package_versions_for_package_owned_by_user(
&self,
package_type: &str,
package_name: &str,
username: &str
) -> Result<Vec<PackageVersion>, PackagesGetAllPackageVersionsForPackageOwnedByUserError>
pub fn get_all_package_versions_for_package_owned_by_user(
&self,
package_type: &str,
package_name: &str,
username: &str
) -> Result<Vec<PackageVersion>, PackagesGetAllPackageVersionsForPackageOwnedByUserError>
Get all package versions for a package owned by a user
Returns all package versions for a public package owned by a specified user.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for get_all_package_versions_for_package_owned_by_user
pub async fn get_package_for_authenticated_user_async(
&self,
package_type: &str,
package_name: &str
) -> Result<Package, PackagesGetPackageForAuthenticatedUserError>
pub async fn get_package_for_authenticated_user_async(
&self,
package_type: &str,
package_name: &str
) -> Result<Package, PackagesGetPackageForAuthenticatedUserError>
Get a package for the authenticated user
Gets a specific package for a package owned by the authenticated user.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for get_package_for_authenticated_user
pub fn get_package_for_authenticated_user(
&self,
package_type: &str,
package_name: &str
) -> Result<Package, PackagesGetPackageForAuthenticatedUserError>
pub fn get_package_for_authenticated_user(
&self,
package_type: &str,
package_name: &str
) -> Result<Package, PackagesGetPackageForAuthenticatedUserError>
Get a package for the authenticated user
Gets a specific package for a package owned by the authenticated user.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for get_package_for_authenticated_user
pub async fn get_package_for_organization_async(
&self,
package_type: &str,
package_name: &str,
org: &str
) -> Result<Package, PackagesGetPackageForOrganizationError>
pub async fn get_package_for_organization_async(
&self,
package_type: &str,
package_name: &str,
org: &str
) -> Result<Package, PackagesGetPackageForOrganizationError>
Get a package for an organization
Gets a specific package in an organization.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for get_package_for_organization
pub fn get_package_for_organization(
&self,
package_type: &str,
package_name: &str,
org: &str
) -> Result<Package, PackagesGetPackageForOrganizationError>
pub fn get_package_for_organization(
&self,
package_type: &str,
package_name: &str,
org: &str
) -> Result<Package, PackagesGetPackageForOrganizationError>
Get a package for an organization
Gets a specific package in an organization.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for get_package_for_organization
pub async fn get_package_for_user_async(
&self,
package_type: &str,
package_name: &str,
username: &str
) -> Result<Package, PackagesGetPackageForUserError>
pub async fn get_package_for_user_async(
&self,
package_type: &str,
package_name: &str,
username: &str
) -> Result<Package, PackagesGetPackageForUserError>
Get a package for a user
Gets a specific package metadata for a public package owned by a user.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for get_package_for_user
pub fn get_package_for_user(
&self,
package_type: &str,
package_name: &str,
username: &str
) -> Result<Package, PackagesGetPackageForUserError>
pub fn get_package_for_user(
&self,
package_type: &str,
package_name: &str,
username: &str
) -> Result<Package, PackagesGetPackageForUserError>
Get a package for a user
Gets a specific package metadata for a public package owned by a user.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for get_package_for_user
pub async fn get_package_version_for_authenticated_user_async(
&self,
package_type: &str,
package_name: &str,
package_version_id: i32
) -> Result<PackageVersion, PackagesGetPackageVersionForAuthenticatedUserError>
pub async fn get_package_version_for_authenticated_user_async(
&self,
package_type: &str,
package_name: &str,
package_version_id: i32
) -> Result<PackageVersion, PackagesGetPackageVersionForAuthenticatedUserError>
Get a package version for the authenticated user
Gets a specific package version for a package owned by the authenticated user.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for get_package_version_for_authenticated_user
pub fn get_package_version_for_authenticated_user(
&self,
package_type: &str,
package_name: &str,
package_version_id: i32
) -> Result<PackageVersion, PackagesGetPackageVersionForAuthenticatedUserError>
pub fn get_package_version_for_authenticated_user(
&self,
package_type: &str,
package_name: &str,
package_version_id: i32
) -> Result<PackageVersion, PackagesGetPackageVersionForAuthenticatedUserError>
Get a package version for the authenticated user
Gets a specific package version for a package owned by the authenticated user.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for get_package_version_for_authenticated_user
pub async fn get_package_version_for_organization_async(
&self,
package_type: &str,
package_name: &str,
org: &str,
package_version_id: i32
) -> Result<PackageVersion, PackagesGetPackageVersionForOrganizationError>
pub async fn get_package_version_for_organization_async(
&self,
package_type: &str,
package_name: &str,
org: &str,
package_version_id: i32
) -> Result<PackageVersion, PackagesGetPackageVersionForOrganizationError>
Get a package version for an organization
Gets a specific package version in an organization.
You must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for get_package_version_for_organization
pub fn get_package_version_for_organization(
&self,
package_type: &str,
package_name: &str,
org: &str,
package_version_id: i32
) -> Result<PackageVersion, PackagesGetPackageVersionForOrganizationError>
pub fn get_package_version_for_organization(
&self,
package_type: &str,
package_name: &str,
org: &str,
package_version_id: i32
) -> Result<PackageVersion, PackagesGetPackageVersionForOrganizationError>
Get a package version for an organization
Gets a specific package version in an organization.
You must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for get_package_version_for_organization
pub async fn get_package_version_for_user_async(
&self,
package_type: &str,
package_name: &str,
package_version_id: i32,
username: &str
) -> Result<PackageVersion, PackagesGetPackageVersionForUserError>
pub async fn get_package_version_for_user_async(
&self,
package_type: &str,
package_name: &str,
package_version_id: i32,
username: &str
) -> Result<PackageVersion, PackagesGetPackageVersionForUserError>
Get a package version for a user
Gets a specific package version for a public package owned by a specified user.
At this time, to use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for get_package_version_for_user
pub fn get_package_version_for_user(
&self,
package_type: &str,
package_name: &str,
package_version_id: i32,
username: &str
) -> Result<PackageVersion, PackagesGetPackageVersionForUserError>
pub fn get_package_version_for_user(
&self,
package_type: &str,
package_name: &str,
package_version_id: i32,
username: &str
) -> Result<PackageVersion, PackagesGetPackageVersionForUserError>
Get a package version for a user
Gets a specific package version for a public package owned by a specified user.
At this time, to use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for get_package_version_for_user
pub async fn list_packages_for_authenticated_user_async(
&self,
query_params: impl Into<PackagesListPackagesForAuthenticatedUserParams<'api>>
) -> Result<Vec<Package>, PackagesListPackagesForAuthenticatedUserError>
pub async fn list_packages_for_authenticated_user_async(
&self,
query_params: impl Into<PackagesListPackagesForAuthenticatedUserParams<'api>>
) -> Result<Vec<Package>, PackagesListPackagesForAuthenticatedUserError>
List packages for the authenticated user's namespace
Lists packages owned by the authenticated user within the user’s namespace.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for list_packages_for_authenticated_user
pub fn list_packages_for_authenticated_user(
&self,
query_params: impl Into<PackagesListPackagesForAuthenticatedUserParams<'api>>
) -> Result<Vec<Package>, PackagesListPackagesForAuthenticatedUserError>
pub fn list_packages_for_authenticated_user(
&self,
query_params: impl Into<PackagesListPackagesForAuthenticatedUserParams<'api>>
) -> Result<Vec<Package>, PackagesListPackagesForAuthenticatedUserError>
List packages for the authenticated user's namespace
Lists packages owned by the authenticated user within the user’s namespace.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for list_packages_for_authenticated_user
pub async fn list_packages_for_organization_async(
&self,
org: &str,
query_params: impl Into<PackagesListPackagesForOrganizationParams<'api>>
) -> Result<Vec<Package>, PackagesListPackagesForOrganizationError>
pub async fn list_packages_for_organization_async(
&self,
org: &str,
query_params: impl Into<PackagesListPackagesForOrganizationParams<'api>>
) -> Result<Vec<Package>, PackagesListPackagesForOrganizationError>
List packages for an organization
Lists all packages in an organization readable by the user.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for list_packages_for_organization
pub fn list_packages_for_organization(
&self,
org: &str,
query_params: impl Into<PackagesListPackagesForOrganizationParams<'api>>
) -> Result<Vec<Package>, PackagesListPackagesForOrganizationError>
pub fn list_packages_for_organization(
&self,
org: &str,
query_params: impl Into<PackagesListPackagesForOrganizationParams<'api>>
) -> Result<Vec<Package>, PackagesListPackagesForOrganizationError>
List packages for an organization
Lists all packages in an organization readable by the user.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for list_packages_for_organization
pub async fn list_packages_for_user_async(
&self,
username: &str,
query_params: impl Into<PackagesListPackagesForUserParams<'api>>
) -> Result<Vec<Package>, PackagesListPackagesForUserError>
pub async fn list_packages_for_user_async(
&self,
username: &str,
query_params: impl Into<PackagesListPackagesForUserParams<'api>>
) -> Result<Vec<Package>, PackagesListPackagesForUserError>
List packages for a user
Lists all packages in a user’s namespace for which the requesting user has access.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for list_packages_for_user
pub fn list_packages_for_user(
&self,
username: &str,
query_params: impl Into<PackagesListPackagesForUserParams<'api>>
) -> Result<Vec<Package>, PackagesListPackagesForUserError>
pub fn list_packages_for_user(
&self,
username: &str,
query_params: impl Into<PackagesListPackagesForUserParams<'api>>
) -> Result<Vec<Package>, PackagesListPackagesForUserError>
List packages for a user
Lists all packages in a user’s namespace for which the requesting user has access.
To use this endpoint, you must authenticate using an access token with the packages:read
scope.
If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for list_packages_for_user
pub async fn restore_package_for_authenticated_user_async(
&self,
package_type: &str,
package_name: &str,
query_params: Option<impl Into<PackagesRestorePackageForAuthenticatedUserParams<'api>>>
) -> Result<(), PackagesRestorePackageForAuthenticatedUserError>
pub async fn restore_package_for_authenticated_user_async(
&self,
package_type: &str,
package_name: &str,
query_params: Option<impl Into<PackagesRestorePackageForAuthenticatedUserParams<'api>>>
) -> Result<(), PackagesRestorePackageForAuthenticatedUserError>
Restore a package for the authenticated user
Restores a package owned by the authenticated user.
You can restore a deleted package under the following conditions:
- The package was deleted within the last 30 days.
- The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package’s namespace first.
To use this endpoint, you must authenticate using an access token with the packages:read
and packages:write
scopes. If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for restore_package_for_authenticated_user
pub fn restore_package_for_authenticated_user(
&self,
package_type: &str,
package_name: &str,
query_params: Option<impl Into<PackagesRestorePackageForAuthenticatedUserParams<'api>>>
) -> Result<(), PackagesRestorePackageForAuthenticatedUserError>
pub fn restore_package_for_authenticated_user(
&self,
package_type: &str,
package_name: &str,
query_params: Option<impl Into<PackagesRestorePackageForAuthenticatedUserParams<'api>>>
) -> Result<(), PackagesRestorePackageForAuthenticatedUserError>
Restore a package for the authenticated user
Restores a package owned by the authenticated user.
You can restore a deleted package under the following conditions:
- The package was deleted within the last 30 days.
- The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package’s namespace first.
To use this endpoint, you must authenticate using an access token with the packages:read
and packages:write
scopes. If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for restore_package_for_authenticated_user
pub async fn restore_package_for_org_async(
&self,
package_type: &str,
package_name: &str,
org: &str,
query_params: Option<impl Into<PackagesRestorePackageForOrgParams<'api>>>
) -> Result<(), PackagesRestorePackageForOrgError>
pub async fn restore_package_for_org_async(
&self,
package_type: &str,
package_name: &str,
org: &str,
query_params: Option<impl Into<PackagesRestorePackageForOrgParams<'api>>>
) -> Result<(), PackagesRestorePackageForOrgError>
Restore a package for an organization
Restores an entire package in an organization.
You can restore a deleted package under the following conditions:
- The package was deleted within the last 30 days.
- The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package’s namespace first.
To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read
and packages:write
scopes. In addition:
- If
package_type
is notcontainer
, your token must also include therepo
scope. - If
package_type
iscontainer
, you must also have admin permissions to the container that you want to restore.
GitHub API docs for restore_package_for_org
pub fn restore_package_for_org(
&self,
package_type: &str,
package_name: &str,
org: &str,
query_params: Option<impl Into<PackagesRestorePackageForOrgParams<'api>>>
) -> Result<(), PackagesRestorePackageForOrgError>
pub fn restore_package_for_org(
&self,
package_type: &str,
package_name: &str,
org: &str,
query_params: Option<impl Into<PackagesRestorePackageForOrgParams<'api>>>
) -> Result<(), PackagesRestorePackageForOrgError>
Restore a package for an organization
Restores an entire package in an organization.
You can restore a deleted package under the following conditions:
- The package was deleted within the last 30 days.
- The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package’s namespace first.
To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read
and packages:write
scopes. In addition:
- If
package_type
is notcontainer
, your token must also include therepo
scope. - If
package_type
iscontainer
, you must also have admin permissions to the container that you want to restore.
GitHub API docs for restore_package_for_org
pub async fn restore_package_for_user_async(
&self,
package_type: &str,
package_name: &str,
username: &str,
query_params: Option<impl Into<PackagesRestorePackageForUserParams<'api>>>
) -> Result<(), PackagesRestorePackageForUserError>
pub async fn restore_package_for_user_async(
&self,
package_type: &str,
package_name: &str,
username: &str,
query_params: Option<impl Into<PackagesRestorePackageForUserParams<'api>>>
) -> Result<(), PackagesRestorePackageForUserError>
Restore a package for a user
Restores an entire package for a user.
You can restore a deleted package under the following conditions:
- The package was deleted within the last 30 days.
- The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package’s namespace first.
To use this endpoint, you must authenticate using an access token with the packages:read
and packages:write
scopes. In addition:
- If
package_type
is notcontainer
, your token must also include therepo
scope. - If
package_type
iscontainer
, you must also have admin permissions to the container that you want to restore.
GitHub API docs for restore_package_for_user
pub fn restore_package_for_user(
&self,
package_type: &str,
package_name: &str,
username: &str,
query_params: Option<impl Into<PackagesRestorePackageForUserParams<'api>>>
) -> Result<(), PackagesRestorePackageForUserError>
pub fn restore_package_for_user(
&self,
package_type: &str,
package_name: &str,
username: &str,
query_params: Option<impl Into<PackagesRestorePackageForUserParams<'api>>>
) -> Result<(), PackagesRestorePackageForUserError>
Restore a package for a user
Restores an entire package for a user.
You can restore a deleted package under the following conditions:
- The package was deleted within the last 30 days.
- The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package’s namespace first.
To use this endpoint, you must authenticate using an access token with the packages:read
and packages:write
scopes. In addition:
- If
package_type
is notcontainer
, your token must also include therepo
scope. - If
package_type
iscontainer
, you must also have admin permissions to the container that you want to restore.
GitHub API docs for restore_package_for_user
pub async fn restore_package_version_for_authenticated_user_async(
&self,
package_type: &str,
package_name: &str,
package_version_id: i32
) -> Result<(), PackagesRestorePackageVersionForAuthenticatedUserError>
pub async fn restore_package_version_for_authenticated_user_async(
&self,
package_type: &str,
package_name: &str,
package_version_id: i32
) -> Result<(), PackagesRestorePackageVersionForAuthenticatedUserError>
Restore a package version for the authenticated user
Restores a package version owned by the authenticated user.
You can restore a deleted package version under the following conditions:
- The package was deleted within the last 30 days.
- The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package’s namespace first.
To use this endpoint, you must authenticate using an access token with the packages:read
and packages:write
scopes. If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for restore_package_version_for_authenticated_user
pub fn restore_package_version_for_authenticated_user(
&self,
package_type: &str,
package_name: &str,
package_version_id: i32
) -> Result<(), PackagesRestorePackageVersionForAuthenticatedUserError>
pub fn restore_package_version_for_authenticated_user(
&self,
package_type: &str,
package_name: &str,
package_version_id: i32
) -> Result<(), PackagesRestorePackageVersionForAuthenticatedUserError>
Restore a package version for the authenticated user
Restores a package version owned by the authenticated user.
You can restore a deleted package version under the following conditions:
- The package was deleted within the last 30 days.
- The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package’s namespace first.
To use this endpoint, you must authenticate using an access token with the packages:read
and packages:write
scopes. If package_type
is not container
, your token must also include the repo
scope.
GitHub API docs for restore_package_version_for_authenticated_user
pub async fn restore_package_version_for_org_async(
&self,
package_type: &str,
package_name: &str,
org: &str,
package_version_id: i32
) -> Result<(), PackagesRestorePackageVersionForOrgError>
pub async fn restore_package_version_for_org_async(
&self,
package_type: &str,
package_name: &str,
org: &str,
package_version_id: i32
) -> Result<(), PackagesRestorePackageVersionForOrgError>
Restore package version for an organization
Restores a specific package version in an organization.
You can restore a deleted package under the following conditions:
- The package was deleted within the last 30 days.
- The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package’s namespace first.
To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read
and packages:write
scopes. In addition:
- If
package_type
is notcontainer
, your token must also include therepo
scope. - If
package_type
iscontainer
, you must also have admin permissions to the container that you want to restore.
GitHub API docs for restore_package_version_for_org
pub fn restore_package_version_for_org(
&self,
package_type: &str,
package_name: &str,
org: &str,
package_version_id: i32
) -> Result<(), PackagesRestorePackageVersionForOrgError>
pub fn restore_package_version_for_org(
&self,
package_type: &str,
package_name: &str,
org: &str,
package_version_id: i32
) -> Result<(), PackagesRestorePackageVersionForOrgError>
Restore package version for an organization
Restores a specific package version in an organization.
You can restore a deleted package under the following conditions:
- The package was deleted within the last 30 days.
- The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package’s namespace first.
To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read
and packages:write
scopes. In addition:
- If
package_type
is notcontainer
, your token must also include therepo
scope. - If
package_type
iscontainer
, you must also have admin permissions to the container that you want to restore.
GitHub API docs for restore_package_version_for_org
pub async fn restore_package_version_for_user_async(
&self,
package_type: &str,
package_name: &str,
username: &str,
package_version_id: i32
) -> Result<(), PackagesRestorePackageVersionForUserError>
pub async fn restore_package_version_for_user_async(
&self,
package_type: &str,
package_name: &str,
username: &str,
package_version_id: i32
) -> Result<(), PackagesRestorePackageVersionForUserError>
Restore package version for a user
Restores a specific package version for a user.
You can restore a deleted package under the following conditions:
- The package was deleted within the last 30 days.
- The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package’s namespace first.
To use this endpoint, you must authenticate using an access token with the packages:read
and packages:write
scopes. In addition:
- If
package_type
is notcontainer
, your token must also include therepo
scope. - If
package_type
iscontainer
, you must also have admin permissions to the container that you want to restore.
GitHub API docs for restore_package_version_for_user
pub fn restore_package_version_for_user(
&self,
package_type: &str,
package_name: &str,
username: &str,
package_version_id: i32
) -> Result<(), PackagesRestorePackageVersionForUserError>
pub fn restore_package_version_for_user(
&self,
package_type: &str,
package_name: &str,
username: &str,
package_version_id: i32
) -> Result<(), PackagesRestorePackageVersionForUserError>
Restore package version for a user
Restores a specific package version for a user.
You can restore a deleted package under the following conditions:
- The package was deleted within the last 30 days.
- The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package’s namespace first.
To use this endpoint, you must authenticate using an access token with the packages:read
and packages:write
scopes. In addition:
- If
package_type
is notcontainer
, your token must also include therepo
scope. - If
package_type
iscontainer
, you must also have admin permissions to the container that you want to restore.
GitHub API docs for restore_package_version_for_user