Swiftpack.co - CrunchyBagel/CBAppleMusic as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by CrunchyBagel.
CrunchyBagel/CBAppleMusic 2.1.3
A Swift package to easily access the Apple Music API.
⭐️ 0
🕓 5 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/CrunchyBagel/CBAppleMusic.git", from: "2.1.3")

CBAppleMusicAPI

A Swift package to simplify reading data from the Apple Music API:

https://developer.apple.com/documentation/applemusicapi/

This package was created initially for use in Streaks Workout (https://streaksworkout.app), so as such, there may be missing parts of the API which we will aim to fill out over time.

We welcome pull requests to fill out these missing parts.


Sample Usage:

let developerToken = fetchDeveloperToken()

let api = AppleMusicAPI(
    developerToken: developerToken,
    countryCode: "au"
)

api.searchPlaylists(term: "workout") { result in
    switch result {
        case .failure(let error):
            // Handle error
        case .success(let playlists):
            // Handle playlists
    }
}

GitHub

link
Stars: 0
Last commit: 5 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

5 weeks ago

Async wrappers

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics