hey_sdk/generated/services/
identity.rs1#![allow(missing_docs, unreachable_pub, clippy::all, clippy::pedantic)]
4
5use crate::client::Client;
6use crate::error::Error;
7use crate::generated::routes;
8use crate::generated::types::*;
9
10pub struct Identity<'a> {
11 client: &'a Client,
12}
13
14impl<'a> Identity<'a> {
15 pub(crate) fn new(client: &'a Client) -> Self {
16 Self { client }
17 }
18
19 pub fn client(&self) -> &'a Client {
21 self.client
22 }
23
24 pub async fn get(&self) -> Result<GetIdentityResponseContent, Error> {
26 let operation = self.client.operation(&routes::GET_IDENTITY, &[]);
27 self.client.send(operation).await
28 }
29
30 pub async fn get_navigation(&self) -> Result<GetNavigationResponseContent, Error> {
32 let operation = self.client.operation(&routes::GET_NAVIGATION, &[]);
33 self.client.send(operation).await
34 }
35
36 pub async fn update_first_week_day(
40 &self,
41 body: &UpdateFirstWeekDayRequestContent,
42 ) -> Result<UpdateFirstWeekDayResponseContent, Error> {
43 let mut operation = self.client.operation(&routes::UPDATE_FIRST_WEEK_DAY, &[]);
44 operation.json(body)?;
45 self.client.send(operation).await
46 }
47
48 pub async fn update_time_format(
52 &self,
53 body: &UpdateTimeFormatRequestContent,
54 ) -> Result<UpdateTimeFormatResponseContent, Error> {
55 let mut operation = self.client.operation(&routes::UPDATE_TIME_FORMAT, &[]);
56 operation.json(body)?;
57 self.client.send(operation).await
58 }
59}