mangadex_api/v5/upload/upload_session_id/
commit.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
pub mod post;

use crate::HttpClientRef;

use uuid::Uuid;

use post::CommitUploadSessionBuilder;

/// Statistics endpoint handler builder.
#[derive(Clone, Debug)]
pub struct CommitEndpoint {
    http_client: HttpClientRef,
    upload_session_id: Uuid,
}

impl CommitEndpoint {
    #[doc(hidden)]
    pub(crate) fn new(http_client: HttpClientRef, upload_session_id: Uuid) -> Self {
        Self {
            http_client,
            upload_session_id,
        }
    }

    pub fn post(&self) -> CommitUploadSessionBuilder {
        CommitUploadSessionBuilder::new(self.http_client.clone()).session_id(self.upload_session_id)
    }
}