Updated the DocC catalog and README file to the latest version of the API.

This commit is contained in:
javier committed 2026-10-25 17:19:16 +01:00
1 parent 0f172d8824
commit fde2382056
8 files changed
+396 -59

No files matched your search

@@ -1,16 +1,14 @@
# ``ASConnectService``
A Swift client library for the App Store Connect API, generated from the official OpenAPI specification.
A type-safe Swift client for the App Store Connect API.
## Overview
``ASConnectService`` provides a type-safe, Swift-native interface to Apple's App Store Connect API. This package enables developers to programmatically interact with App Store Connect services for managing apps, builds, reviews, sales reports, and more.
The library is automatically generated from the official App Store Connect API OpenAPI specification using Apple's [swift-openapi-generator](https://github.com/apple/swift-openapi-generator), ensuring complete API coverage and type safety.
ASConnectService exposes every endpoint of Apple's App Store Connect API as a Swift method with typed requests and responses. It's generated from the official OpenAPI specification with [Swift OpenAPI Generator](https://github.com/apple/swift-openapi-generator).
### Creating a Client
Create a ``Client`` instance by providing a server URL and transport. Use ``BearerAuthMiddleware`` to authenticate requests with a JSON Web Token (JWT).
Create a ``Client`` with a server URL, a transport, and a ``BearerAuthMiddleware`` that authenticates each request with a JSON Web Token (JWT):
```swift
import ASConnectService
@@ -35,12 +33,15 @@ BearerAuthMiddleware {
### Making API Calls
The ``Client`` conforms to ``APIProtocol``, which defines a method for every endpoint in the App Store Connect API. Each method accepts an `Input` value and returns an `Output` value with the response.
Each endpoint is a method on ``Client``, declared by ``APIProtocol``. It returns an `Output` enum with a case for each documented response:
```swift
let response = try await client.appsGetCollection(.init())
let response = try await client.appsGetCollection(query: .init(limit: 10))
let apps = try response.ok.body.json.data
```
The `ok` property throws for any other response. To handle those, switch over the `Output` cases, such as `.unauthorized` or `.undocumented(statusCode:_:)`.
## Topics
### API Client