pub struct Revisions {
pub client: Client,
}Fields§
§client: ClientImplementations§
Source§impl Revisions
impl Revisions
Sourcepub async fn list(
&self,
file_id: &str,
page_size: i64,
page_token: &str,
) -> Result<Response<Vec<Revision>>, ClientError>
pub async fn list( &self, file_id: &str, page_size: i64, page_token: &str, ) -> Result<Response<Vec<Revision>>, ClientError>
This function performs a GET to the /files/{fileId}/revisions endpoint.
Lists a file’s revisions.
Parameters:
file_id: &str– A link to this theme’s background image.page_size: i64– A map of maximum import sizes by MIME type, in bytes.page_token: &str– The token for continuing a previous list request on the next page. This should be set to the value of ‘nextPageToken’ from the previous response.
Sourcepub async fn list_all(
&self,
file_id: &str,
) -> Result<Response<Vec<Revision>>, ClientError>
pub async fn list_all( &self, file_id: &str, ) -> Result<Response<Vec<Revision>>, ClientError>
This function performs a GET to the /files/{fileId}/revisions endpoint.
As opposed to list, this function returns all the pages of the request at once.
Lists a file’s revisions.
Sourcepub async fn get(
&self,
file_id: &str,
revision_id: &str,
acknowledge_abuse: bool,
) -> Result<Response<Revision>, ClientError>
pub async fn get( &self, file_id: &str, revision_id: &str, acknowledge_abuse: bool, ) -> Result<Response<Revision>, ClientError>
This function performs a GET to the /files/{fileId}/revisions/{revisionId} endpoint.
Gets a revision’s metadata or content by ID.
Parameters:
file_id: &str– A link to this theme’s background image.revision_id: &str– A link to this theme’s background image.acknowledge_abuse: bool– Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.
Sourcepub async fn delete(
&self,
file_id: &str,
revision_id: &str,
) -> Result<Response<()>, ClientError>
pub async fn delete( &self, file_id: &str, revision_id: &str, ) -> Result<Response<()>, ClientError>
This function performs a DELETE to the /files/{fileId}/revisions/{revisionId} endpoint.
Permanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can’t be deleted.
Parameters:
file_id: &str– A link to this theme’s background image.revision_id: &str– A link to this theme’s background image.
Sourcepub async fn update(
&self,
file_id: &str,
revision_id: &str,
body: &Revision,
) -> Result<Response<Revision>, ClientError>
pub async fn update( &self, file_id: &str, revision_id: &str, body: &Revision, ) -> Result<Response<Revision>, ClientError>
This function performs a PATCH to the /files/{fileId}/revisions/{revisionId} endpoint.
Updates a revision with patch semantics.
Parameters:
file_id: &str– A link to this theme’s background image.revision_id: &str– A link to this theme’s background image.
Auto Trait Implementations§
impl Freeze for Revisions
impl !RefUnwindSafe for Revisions
impl Send for Revisions
impl Sync for Revisions
impl Unpin for Revisions
impl !UnwindSafe for Revisions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more