Giter Club home page Giter Club logo

cider's Introduction

Cider

The Missing Apple Music SDK. Written in Swift.

Build Status codecov.io Carthage compatible CocoaPods SPM compatible Platform iOS Language Swift 4.0

Installation

Carthage

Add the following to your Cartfile:

github "scottrhoyt/Cider" ~> 0.10

CocoaPods

Add the following to your Podfile:

pod 'Cider', '~> 0.10'

SPM

Add to your Package.swift file like so:

import PackageDescription

let package = Package(
    name: "<YOUR_PROJECT_NAME>",
    dependencies: [
        .package(url: "https://github.com/scottrhoyt/Cider.git", from: "0.10.0")
    ]
)

Usage

Developer Token

To use the Apple Music API, you will need to generate a developer token. Instructions for how to do this can be found in the Apple Music API reference.

Once you have an Apple Music Key you can use a 3rd party library/tool to generate your token. I created a Node.js library and CLI tool that you can find here.

Create a Client

let developerToken = "<developer_token>"
let cider = CiderClient(storefront: .unitedStates, developerToken: developerToken)

Search the Catalog

cider.search(term: "Michael Jackson", types: [.albums, .songs]) { results, error in
  // Process the results or error
}

Lookup an Artist/Album/Song

let songId = "<song_id>"
cider.song(id: songId) { result, error in
  // Process the results or error
}

API Reference

The full API reference can be found here.

License

MIT

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.