mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-11-01 09:32:15 +00:00
docs: Add Swift SDK README with comprehensive API documentation and implement authentication provider with JWT support
- Add README.md with installation instructions, architecture overview, and API examples for all SDK modules - Add AuthProvider class with API key and JWT token support (generateJWTToken, validateJWTToken, getHeaders, clearTokenCache methods) - Add HTTPClient base class with retry logic, error handling, and timeout management - Add GraphQLAPI, PaymentAPI, RatingPlanAPI, SubscriberAPI, SystemAPI, and UsageAPI modules - Add TelecomSDK main client integrating all API
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import Foundation
|
||||
|
||||
/// API for system management
|
||||
public class SystemAPI {
|
||||
private let client: HTTPClient
|
||||
|
||||
public init(client: HTTPClient) {
|
||||
self.client = client
|
||||
}
|
||||
|
||||
/// Get system statistics
|
||||
public func getStats() async throws -> SystemStats {
|
||||
return try await client.get(path: "/v1/system/stats")
|
||||
}
|
||||
|
||||
/// Get system health status
|
||||
public func getHealth() async throws -> HealthStatus {
|
||||
return try await client.get(path: "/v1/health")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user