// SPDX-FileCopyrightText: Politik im Blick developers
// SPDX-FileCopyrightText: Wolfgang Silbermayr <wolfgang@silbermayr.at>
//
// SPDX-License-Identifier: AGPL-3.0-or-later OR EUPL-1.2

use http_request_derive_client_reqwest::ReqwestClientError;
use pib_client_requests::me::profile::get::Request;
use pib_service_api_types::me::profile::get::ResponseBody;

use crate::{Authorization, Client};

impl Client {
    pub async fn me_profile_get<A: Authorization + Sync>(
        &self,
        authorization: A,
    ) -> Result<ResponseBody, ReqwestClientError> {
        Ok(self.execute_authorized(Request, authorization).await?.0)
    }
}
