818 B
818 B
Client
The App Store Connect API client.
Overview
Client implements every APIProtocol method by sending the request through its transport, after passing it through its middlewares.
Include BearerAuthMiddleware in middlewares to authenticate requests:
import ASConnectService
import OpenAPIURLSession
let client = Client(
serverURL: try Servers.Server1.url(),
transport: URLSessionTransport(),
middlewares: [
BearerAuthMiddleware(token: yourJWTToken)
]
)
Each method takes either a single Input value or its path, query, headers, and body as separate arguments:
let response = try await client.appsGetInstance(path: .init(id: appID))
Topics
Creating a Client
init(serverURL:configuration:transport:middlewares:)