Updated the DocC catalog and README file to the latest version of the API.
This commit is contained in:
1 parent
0f172d8824
commit
fde2382056
8 files changed
+396
-59
No files matched your search
@@ -64,12 +64,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:_:)`.
|
||||
|
||||
## Supported Platforms
|
||||
|
||||
- iOS 13.0+
|
||||
|
||||
Reference in new issue
Block a user