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
@@ -1,14 +1,12 @@
|
||||
# ``Client``
|
||||
|
||||
The API client for performing HTTP operations against the App Store Connect API.
|
||||
The App Store Connect API client.
|
||||
|
||||
## Overview
|
||||
|
||||
The ``Client`` struct is the main entry point for interacting with the App Store Connect API. It conforms to ``APIProtocol`` and provides concrete implementations for all available API operations.
|
||||
``Client`` implements every ``APIProtocol`` method by sending the request through its transport, after passing it through its middlewares.
|
||||
|
||||
### Creating a Client
|
||||
|
||||
Create a ``Client`` by providing a server URL, a transport, and optionally a list of middlewares for authentication or request customization.
|
||||
Include ``BearerAuthMiddleware`` in `middlewares` to authenticate requests:
|
||||
|
||||
```swift
|
||||
import ASConnectService
|
||||
@@ -23,12 +21,10 @@ let client = Client(
|
||||
)
|
||||
```
|
||||
|
||||
### Making API Calls
|
||||
|
||||
Each method on the ``Client`` corresponds to an HTTP endpoint defined in the App Store Connect API OpenAPI specification. Methods accept an `Input` value and return an `Output` value representing the response.
|
||||
Each method takes either a single `Input` value or its `path`, `query`, `headers`, and `body` as separate arguments:
|
||||
|
||||
```swift
|
||||
let response = try await client.appsGetCollection(.init())
|
||||
let response = try await client.appsGetInstance(path: .init(id: appID))
|
||||
```
|
||||
|
||||
## Topics
|
||||
|
||||
Reference in new issue
Block a user