Skip to content

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

License

Notifications You must be signed in to change notification settings

LLCFreedom-Space/fs-itunes-search-client

FSITunesSearchClient

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 iTunes Search API. It leverages the power of Swift OpenAPI Generator to automatically generate code from the provided OpenAPI specification file (openapi.yaml).

Features

  • Fetch app information by bundle ID and optional country code.
  • Handles different response formats (JSON and JSONP).
  • Throws informative errors for server errors and not found cases.

Installation

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

Usage

Here's an example of how to use the ITunesSearchClient to fetch information about an app:

let client = try ITunesSearchClient()

do {
let appInfo = try await client.fetchAppInfo(by: "com.example.MyApp")
print("App Version: \(appInfo.version ?? "Not available")")
print("Bundle ID: \(appInfo.bundleId!)")
// ... access other properties of AppInfo
} catch {
print("Error fetching app info: \(error)")
}

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

About

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

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages