pub struct Replies { /* private fields */ }Expand description
A reply to a comment on a file.
Some resource methods (such as replies.update)
require a permission_id. Use the replies.list
method to retrieve the ID for a file, folder, or shared drive.
§Examples:
List the permission in a file
let file_id = "some-file-id";
let permission_list = drive.permissions.list(&file_id).execute()?;
if let Some(permissions) = permission_list.permissions {
for permission in permissions {
println!("{}", permission);
}
}Implementations§
Source§impl Replies
impl Replies
Sourcepub fn new(credentials: &Credentials) -> Self
pub fn new(credentials: &Credentials) -> Self
Creates a new Replies resource with the given Credentials.
Sourcepub fn create<T, U>(&self, file_id: T, comment_id: U) -> CreateRequest
pub fn create<T, U>(&self, file_id: T, comment_id: U) -> CreateRequest
Creates a reply to a comment.
See Google’s documentation for more information.
§Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/drivehttps://www.googleapis.com/auth/drive.file
§Examples:
use drive_v3::objects::Reply;
let reply = Reply {
content: Some( "my reply content".to_string() ),
..Default::default()
};
let file_id = "some-file-id";
let comment_id = "some-comment-id";
let created_reply = drive.replies.create(&file_id, &comment_id)
.reply(&reply)
.execute()?;
assert_eq!(created_reply.content, reply.content);Sourcepub fn delete<T, U, V>(
&self,
file_id: T,
comment_id: U,
reply_id: V,
) -> DeleteRequest
pub fn delete<T, U, V>( &self, file_id: T, comment_id: U, reply_id: V, ) -> DeleteRequest
Deletes a reply.
See Google’s documentation for more information.
§Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/drivehttps://www.googleapis.com/auth/drive.file
§Examples:
let file_id = "some-file-id";
let comment_id = "some-comment-id";
let reply_id = "some-reply-id";
let response = drive.replies.delete(&file_id, &comment_id, &reply_id).execute();
assert!( response.is_ok() );Sourcepub fn get<T, U, V>(&self, file_id: T, comment_id: U, reply_id: V) -> GetRequest
pub fn get<T, U, V>(&self, file_id: T, comment_id: U, reply_id: V) -> GetRequest
Gets a reply by ID.
See Google’s documentation for more information.
§Note:
This request requires you to set the fields
parameter.
§Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/drivehttps://www.googleapis.com/auth/drive.filehttps://www.googleapis.com/auth/drive.readonly
§Examples:
let file_id = "some-file-id";
let comment_id = "some-comment-id";
let reply_id = "some-reply-id";
let reply = drive.replies.get(&file_id, &comment_id, &reply_id)
.fields("*")
.execute()?;
println!("This is the comment's reply:\n{}", reply);Sourcepub fn list<T, U>(&self, file_id: T, comment_id: U) -> ListRequest
pub fn list<T, U>(&self, file_id: T, comment_id: U) -> ListRequest
Lists a comment’s replies.
See Google’s documentation for more information.
§Note:
This request requires you to set the fields
parameter.
§Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/drivehttps://www.googleapis.com/auth/drive.filehttps://www.googleapis.com/auth/drive.readonly
§Examples:
let file_id = "some-file-id";
let comment_id = "some-comment-id";
let reply_list = drive.replies.list(&file_id, &comment_id)
.fields("*")
.execute()?;
if let Some(replies) = reply_list.replies {
for reply in replies {
println!("{}", reply);
}
}Sourcepub fn update<T, U, V>(
&self,
file_id: T,
comment_id: U,
reply_id: V,
) -> UpdateRequest
pub fn update<T, U, V>( &self, file_id: T, comment_id: U, reply_id: V, ) -> UpdateRequest
Updates a reply with patch semantics.
See Google’s documentation for more information.
§Note:
This request requires you to set the fields
parameter.
§Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/drivehttps://www.googleapis.com/auth/drive.file
§Examples:
use drive_v3::objects::Reply;
let updated_reply = Reply {
content: Some( "updated content".to_string() ),
..Default::default()
};
let file_id = "some-file-id";
let comment_id = "some-comment-id";
let reply_id = "some-reply-id";
let reply = drive.replies.update(&file_id, &comment_id, &reply_id)
.fields("*")
.reply(&updated_reply)
.execute()?;
assert_eq!(reply.content, updated_reply.content);Trait Implementations§
impl Eq for Replies
impl StructuralPartialEq for Replies
Auto Trait Implementations§
impl Freeze for Replies
impl RefUnwindSafe for Replies
impl Send for Replies
impl Sync for Replies
impl Unpin for Replies
impl UnwindSafe for Replies
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.