Code Monkey home page Code Monkey logo

llcfreedom-space / fs-app-store-connect-client Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 262 KB

This Swift package provides a client library for interacting with the App Store Connect API. It leverages the power of Swift OpenAPI Generator to automatically generate code from the provided OpenAPI specification file (openapi.yaml).

License: GNU Affero General Public License v3.0

Swift 100.00%
appstore-api appstoreconnect appstoreconnectapi openapi-generator swift swift5

fs-app-store-connect-client's Introduction

FSAppStoreConnectClient

Swift Version License GitHub release (with filter) Read the Docs example workflow example workflow example workflow codecov

This Swift package provides a client library for interacting with the App Store Connect API. It leverages the power of Swift OpenAPI Generator to automatically generate code from the provided OpenAPI specification file (openapi.yaml).

Features

  • Find and list your apps in App Store Connect.
  • Get a list of all App Store versions of your app across all platforms.
  • Get a list of all build TestFlight versions of your app.
  • Retrieve the TestFlight prerelease version and the platform for which the prerelease version is intended.
  • Using secure JWT-authenticated requests.
  • Handles JSON formats response.
  • Implemented control over the number of requests from users and handling of rate limit errors.
  • Providing automatically retrying HTTP requests based on customizable retry failed signals and delay strategies.
  • Throws informative errors for server errors and not found cases.
  • Ensure test coverage for code to guarantee robustness and reliability.
  • Updated openapi file to "3.4.2" version.

Installation

  1. Add the package dependency to your Package.swift file:
dependencies: [
.package(url: "https://github.com/LLCFreedom-Space/fs-app-store-connect-client", from: "1.0.2")
]
  1. Import the library in your Swift code:
import AppStoreConnectClient

Usage

Here's an example of how to use the AppStoreConnectClient to fetch information about list of your apps in App Store Connect:

let credentials = Credentials(
    issuerId: "<ISSUER_ID>"
    keyId: "<KEY_ID>"
    privateKey:
        """
        -----BEGIN PRIVATE KEY-----
                PRIVATE KEY
        -----END PRIVATE KEY-----
        """,
    expireDuration: "<TIME_INTERVAL>"
    )
let client = try AppStoreConnectClient(with: credentials)
do {
let fetchedApps = try await client.fetchApps()
// ... access to properties of apps
} catch {
print("Error fetching: \(error)")
}

Here's an example of how to use the AppStoreConnectClient to fetch information about versions of your app:

let credentials = Credentials(
    issuerId: "<ISSUER_ID>"
    keyId: "<KEY_ID>"
    privateKey:
        """
        -----BEGIN PRIVATE KEY-----
                PRIVATE KEY
        -----END PRIVATE KEY-----
        """,
    expireDuration: "<TIME_INTERVAL>"
    )
let client = try AppStoreConnectClient(with: credentials)
do {
let fetchedApps = try await client.fetchApps()
let apps = try await client.fetchApps()
guard let app = apps.first(where: { $0.bundleId == "your.bundle.id" }) else {
        throw AppStoreConnectError.invalidBundleId
    }
let releases = try await client.fetchVersions(for: app)
// ... access to properties of apps
} catch {
print("Error fetching: \(error)")
}

Implemented Endpoints

To enable automatic code generation, add the Web Service Endpoint to the openapi-generator-config.yaml file." Currently, the following endpoints are implemented: - v1/apps - v1/apps/{id}/appStoreVersions - v1/builds - v1/builds/{id}/preReleaseVersion

Contributions

We welcome contributions to this project! Please feel free to open issues or pull requests to help improve the package.

Links

LLC Freedom Space โ€“ @LLCFreedomSpace โ€“ [email protected]

Distributed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3. See LICENSE.md for more information.

GitHub

fs-app-store-connect-client's People

Contributors

mcmikius avatar mykolavasyk avatar

Stargazers

 avatar  avatar

Watchers

 avatar

fs-app-store-connect-client's Issues

Rate Limits handling

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.