pub struct Umami {
pub client: Client,
pub token: Token,
pub instance: String,
}Fields§
§client: Client§token: Token§instance: StringImplementations§
Source§impl Umami
impl Umami
pub fn get_users(&self) -> GetUsersRequestBuilder<'_>
pub fn get_websites(&self) -> GetWebsitesRequestBuilder<'_>
pub fn get_teams(&self) -> GetTeamsRequestBuilder<'_>
Source§impl Umami
impl Umami
pub fn get_stats( &self, website_id: impl Into<String>, timestamps: Timestamps, ) -> GetStatsRequestBuilder<'_>
Source§impl Umami
impl Umami
Sourcepub async fn new(
instance: String,
username: String,
password: String,
) -> Result<Self, UmamiError>
pub async fn new( instance: String, username: String, password: String, ) -> Result<Self, UmamiError>
Create a new Umami client, which you’ll use to make your requests!
instance- The URL of the instance’s API route, for examplehttps://your-umami-instance.com/api.username- The username of the user you want to authenticate as.password- The password of the user you want to authenticate as.
pub async fn request<T: DeserializeOwned, P: Serialize + Sized>( &self, method: &str, endpoint: &str, params: P, ) -> Result<T, UmamiError>
Auto Trait Implementations§
impl Freeze for Umami
impl !RefUnwindSafe for Umami
impl Send for Umami
impl Sync for Umami
impl Unpin for Umami
impl UnsafeUnpin for Umami
impl !UnwindSafe for Umami
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more