Overview

The OrganizationListResponse struct represents the response returned when fetching a paginated list of organizations.

Definition

pub struct OrganizationListResponse {
    pub data: Vec<Organization>,
    pub has_more: bool,
}

Fields

data
Vec<Organization>
required
A vector containing the organizations for the current page. Each organization includes details like name, ID, and settings.
has_more
bool
required
Indicates whether there are more organizations available beyond the current page.

Usage Example

use wacht::api::organizations::*;

let options = ListOrganizationsOptions {
    page: Some(1),
    per_page: Some(20),
    search: Some("tech".to_string()),
};

let response = fetch_organizations(Some(options)).await?;

println!("Found {} organizations", response.data.len());

if response.has_more {
    println!("More organizations available on next page");
}

for org in response.data {
    println!("Organization: {} ({})", org.name, org.id);
    println!("  Created: {}", org.created_at);
    println!("  Members: {}", org.member_count);
}

See Also