gitea_sdk/api/issues/comments/
delete.rs1use crate::{error::Result, Client};
2
3#[derive(Debug, Clone)]
4pub struct DeleteCommentBuilder {
5 owner: String,
6 repo: String,
7 comment: i64,
8}
9
10impl DeleteCommentBuilder {
11 pub fn new(owner: impl ToString, repo: impl ToString, comment: i64) -> Self {
12 Self {
13 owner: owner.to_string(),
14 repo: repo.to_string(),
15 comment,
16 }
17 }
18
19 pub async fn send(&self, client: &Client) -> Result<()> {
21 let req = client
22 .delete(format!(
23 "repos/{}/{}/issues/comments/{}",
24 self.owner, self.repo, self.comment
25 ))
26 .build()?;
27 let _ = client.make_request(req).await?;
28 Ok(())
29 }
30}