Skip to main content
API Reference SwiftyNsdk NsdkSitesSession

requestSitesForOrganization

Requests sites for an organization and waits for the result....

Declaration

func requestSitesForOrganization(orgId: String, pollingInterval: TimeInterval = 0.5, timeout: TimeInterval = 60.0) async throws -> SiteResult

Summary

Requests sites for an organization and waits for the result.
- Parameters:
- orgId: The organization ID to fetch sites for.
- pollingInterval: The interval between status checks (default: 0.5 seconds).
- timeout: Maximum time to wait for completion (default: 60 seconds).
- Returns: A SiteResult containing the sites.
- Throws:
- CancellationError if the Task running this function was cancelled.
- TimeoutError if the function timed out before it could complete execution.
- SitesResult.Error if there was an error specific to the network query.


ON THIS PAGE