melvin_ob/http_handler/http_response/
daily_map.rs

1use crate::http_handler::http_response::response_common::{
2    HTTPResponseType, JSONBodyHTTPResponseType, ResponseError,
3};
4
5/// Response type for the /dailyMap endpoint
6pub(crate) struct DailyMapResponse {}
7
8impl JSONBodyHTTPResponseType for DailyMapResponse {}
9
10impl HTTPResponseType for DailyMapResponse {
11    /// Parsed type of the response from this endpoint
12    type ParsedResponseType = String;
13
14    /// reads and parses the json response
15    async fn read_response(
16        response: reqwest::Response,
17    ) -> Result<Self::ParsedResponseType, ResponseError> {
18        let resp = Self::unwrap_return_code(response).await?;
19        Self::parse_json_body(resp).await
20    }
21}