melvin_ob/http_handler/http_request/
announcements_get.rs

1use super::annoucements::AnnouncementsResponse;
2use super::request_common::{HTTPRequestMethod, HTTPRequestType, NoBodyHTTPRequestType};
3
4/// Request type for the /announcements endpoint.
5#[derive(Debug)]
6pub struct AnnouncementsRequest {}
7
8impl NoBodyHTTPRequestType for AnnouncementsRequest {}
9
10impl HTTPRequestType for AnnouncementsRequest {
11    /// Type of the expected response.
12    type Response = AnnouncementsResponse;
13    /// `str` object representing the specific endpoint.
14    fn endpoint(&self) -> &'static str { "/annoucements" }
15    /// The corresponding HTTP Request Method.
16    fn request_method(&self) -> HTTPRequestMethod { HTTPRequestMethod::Get }
17}