uptrakit-openapi-client 0.0.1

Typed HTTP client for the Uptrakit web API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::Result;
use crate::UptrakitClient;
use crate::types_impl::roles::RoleResponse;
use uuid::Uuid;

impl UptrakitClient {
    /// List all roles with their permissions.
    pub async fn list_roles(&self) -> Result<Vec<RoleResponse>> {
        self.get(crate::paths::roles::BASE).await
    }

    /// Get a single role by ID with its permissions.
    pub async fn get_role(&self, id: &Uuid) -> Result<RoleResponse> {
        self.get(&crate::paths::roles::by_id(id)).await
    }
}