provident 0.2.2

Unofficial client for the Provident (MeterConnex) utility metering portal: meters, usage history, and reports
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// SPDX-License-Identifier: GPL-3.0-only

use crate::http::Request;
use crate::models::secure::account_info::get_details::{self, AccountDetails, GetDetailsResponse};

use super::Account;
use crate::Result;

impl Account {
    /// The signed-in user's profile (`GetDetails`).
    #[maybe_async::maybe_async]
    pub async fn details(&self) -> Result<AccountDetails> {
        let request = Request::page_method(get_details::METHOD, get_details::PATH).build();
        let response = self.http.send::<GetDetailsResponse>(request).await?;
        Ok(response.into_inner())
    }
}