Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bouncyapp/react-native-apple-music

Package Overview
Dependencies
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bouncyapp/react-native-apple-music

A react native module for the Apple Music API

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

PRs Welcome

React Native Apple Music by Bouncy

The Apple Music API is a web service that lets you access information about the media found in the Apple Music Catalog. Here's what each one includes:

Use this service to retrieve information about albums, songs, artists, playlists, music videos, Apple Music stations, ratings, charts, recommendations, and the user's most recently played content. With proper authorization from the user, you can also create or modify playlists and apply ratings to the user's content.

Here's a quick overview of functionalities supported:

  • Get the Charts of an specific Country or global
  • Get recommendations for an user
  • Get the user's most recently played content
  • Create a Playlist
  • Modify Users Playlists

📖 Getting started

npm install @bouncyapp/react-native-apple-music --save

or

yarn add @bouncyapp/react-native-apple-music

Mostly automatic installation

react-native link @bouncyapp/react-native-apple-music --platforms ios

cd ios && pod install && cd ..

💻 Usage

import AppleMusic from '@bouncyapp/react-native-apple-music';

💡 Initialization/Authorization Methods

All functions returning a Promise that resolves to the result.

  • initialize( keyID, teamID, key )

    Initializes the Apple Music module and resumes a logged in session if there is one. This must be the first method you call when using this module.

    • Parameters

      • keyID - (Required) an object with options to pass to the Spotify Module
      • teamID - (Required) Your Apple Developer Team Id
      • key - (Required) You need to create an Key at Apple's Certificates, Identifiers & Profiles Page with MusicKit as Enabled services
    • Returns

      • A Promise that resolves to a boolean when the module finishes initialization, indicating whether or not a session was automatically logged back in
  • login_basic()

    Login every Apple User with your Key. User can call non-personlised api calls like getCharts etc.

    • Returns

      • A Promise that resolves to a boolean, indicating whether or not the user was logged in
  • login() (Apple Music Subscription Required)

    Login user with Apple Music Subscription

    • Returns

      • A Promise that resolves to a boolean, indicating whether or not the user was logged in
  • getICloudID()

    Get the iCloud ID of my Apple Account

    • Returns

      • A Promise that resolves the iCloud Id
  • getSongCharts()

    Get the current Apple Music Charts

    • Returns

      • A Promise that resolves the Apple Music Charts
  • getAlbumCharts()

    Get the current Apple Music Album Charts

    • Returns

      • A Promise that resolves the Apple Music Album Charts
  • searchSong(query)

    Search for Songs at Apple Music

    • Returns

      • A Promise that resolves an Array with Songs
  • searchAlbum(query)

    Search for Albums at Apple Music

    • Returns

      • A Promise that resolves an Array with Albums
  • searchArtist(query)

    Search for Artists at Apple Music

    • Returns

      • A Promise that resolves an Array with Artists
  • searchPlaylist(query)

    Search for Playlists at Apple Music

    • Returns

      • A Promise that resolves an Array with Playlists
  • getSong(id)

    Get an specific song by id

    • Returns

      • A Promise that resolves the requested song
  • getSongWithIsrc(isrc)

    Get an specific song by isrc

    • Returns

      • A Promise that resolves the requested song
  • getAlbum(id)

    Get an specific album by id

    • Returns

      • A Promise that resolves the requested album
  • getArtist(id)

    Get an specific artist by id

    • Returns

      • A Promise that resolves the requested artist
  • getUserPlaylists() (Apple Music Subscription Required)

    Get the Playlists of my Apple Music Account

    • Returns

      • A Promise that resolves an Array with Playlists
  • recentPlayed() (Apple Music Subscription Required)

    Get the recently played songs, albums, artists of my Apple Music Account

    • Returns

      • A Promise that resolves an Array with songs, albums, artists
  • getHeavyRotation() (Apple Music Subscription Required)

    Heavy Rotation is a collection of albums and playlists selected based on your iPhone listening habits.

    • Returns

      • A Promise that resolves an Array with songs, albums, artists
  • getRecommendations() (Apple Music Subscription Required)

    Get songs, albums, artists recommendations of my Apple Music Account

    • Returns

      • A Promise that resolves an Array with songs, albums, artists
  • addToPlaylist(playlistId, songId) (Apple Music Subscription Required)

    Add the song to the playlist in my Apple Music Account

    • Returns

      • A Promise that resolves to "204" if successfull

TODO

  • Return a user session after login

✨ Credits

🤔 How to contribute

Have an idea? Found a bug? Please raise to ISSUES. Contributions are welcome and are greatly appreciated! Every little bit helps, and credit will always be given.

💖 Support Bouncy

AppStore

Google Play Store

Thanks! ❤️

Keywords

FAQs

Package last updated on 21 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc