Struct roctogen::endpoints::packages::Packages[][src]

pub struct Packages<'api> { /* fields omitted */ }

Implementations

impl<'api> Packages<'api>[src]

pub async fn delete_package_for_authenticated_user_async(
    &self,
    package_type: &str,
    package_name: &str
) -> Result<(), PackagesDeletePackageForAuthenticatedUserError>
[src]


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 scope. 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>
[src]


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 scope. 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>
[src]


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 scope. In addition:

  • If package_type is not container, your token must also include the repo scope.
  • If package_type is container, 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>
[src]


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 scope. In addition:

  • If package_type is not container, your token must also include the repo scope.
  • If package_type is container, 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_version_for_authenticated_user_async(
    &self,
    package_type: &str,
    package_name: &str,
    package_version_id: i32
) -> Result<(), PackagesDeletePackageVersionForAuthenticatedUserError>
[src]


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 scope. 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>
[src]


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 scope. 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>
[src]


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 scope. In addition:

  • If package_type is not container, your token must also include the repo scope.
  • If package_type is container, 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>
[src]


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 scope. In addition:

  • If package_type is not container, your token must also include the repo scope.
  • If package_type is container, 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 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>
[src]


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>
[src]


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>
[src]


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>
[src]


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>
[src]


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>
[src]


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>
[src]


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>
[src]


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>
[src]


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>
[src]


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>
[src]


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>
[src]


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>
[src]


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>
[src]


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>
[src]


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>
[src]


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>
[src]


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>
[src]


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 restore_package_for_authenticated_user_async(
    &self,
    package_type: &str,
    package_name: &str,
    query_params: Option<impl Into<PackagesRestorePackageForAuthenticatedUserParams<'api>>>
) -> Result<(), PackagesRestorePackageForAuthenticatedUserError>
[src]


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 scope. 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>
[src]


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 scope. 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>
[src]


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 scope. In addition:

  • If package_type is not container, your token must also include the repo scope.
  • If package_type is container, 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>
[src]


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 scope. In addition:

  • If package_type is not container, your token must also include the repo scope.
  • If package_type is container, 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_version_for_authenticated_user_async(
    &self,
    package_type: &str,
    package_name: &str,
    package_version_id: i32
) -> Result<(), PackagesRestorePackageVersionForAuthenticatedUserError>
[src]


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 scope. 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>
[src]


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 scope. 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>
[src]


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 scope. In addition:

  • If package_type is not container, your token must also include the repo scope.
  • If package_type is container, 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>
[src]


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 scope. In addition:

  • If package_type is not container, your token must also include the repo scope.
  • If package_type is container, you must also have admin permissions to the container that you want to restore.

GitHub API docs for restore_package_version_for_org


Auto Trait Implementations

impl<'api> RefUnwindSafe for Packages<'api>

impl<'api> Send for Packages<'api>

impl<'api> Sync for Packages<'api>

impl<'api> Unpin for Packages<'api>

impl<'api> UnwindSafe for Packages<'api>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.