Skip to content

Commit

Permalink
Updated the README and the setup file to include user library functio…
Browse files Browse the repository at this point in the history
…nality.
  • Loading branch information
j-jacobson committed Aug 21, 2023
1 parent c6a7f7a commit 3833163
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

A python wrapper for the Apple Music API.

See the [Apple Music API documentation](https://developer.apple.com/documentation/applemusicapi/about_the_apple_music_api) for additional info.
See the [Apple Music API documentation](https://developer.apple.com/documentation/applemusicapi) for additional info.

## Getting Started

Expand All @@ -14,6 +14,8 @@ https://apple-music-python.readthedocs.io

You must have an Apple Developer Account and a MusicKit API Key. See instructions on how to obtain these here: [Getting Keys And Creating Tokens.](https://developer.apple.com/documentation/applemusicapi/getting_keys_and_creating_tokens)

To access a user's library, you need to have a music_user_token. See MusicKit for instructions: [User Authentication for MusicKit.] (https://developer.apple.com/documentation/applemusicapi/user_authentication_for_musickit)

### Dependencies

- [Requests](https://github.com/requests/requests)
Expand All @@ -40,11 +42,17 @@ import applemusicpy
secret_key = 'x'
key_id = 'y'
team_id = 'z'
music_user_token = 'm'

am = applemusicpy.AppleMusic(secret_key=secret_key, key_id=key_id, team_id=team_id, music_user_token=music_user_token)

am = applemusicpy.AppleMusic(secret_key=secret_key, key_id=key_id, team_id=team_id)
results = am.search('travis scott', types=['albums'], limit=5)
for item in results['results']['albums']['data']:
print(item['attributes']['name'])

user_results = am.current_user_saved_tracks(limit=5, offset=0)
for song in user_results['data']:
print(song['attributes']['name'])
```

## Versioning
Expand All @@ -55,6 +63,7 @@ for item in results['results']['albums']['data']:
- v1.0.3 - Fixed error handling of HTTPError - 11/03/2019
- v1.0.4 - Fixed error with reading token - 01/24/2021
- v1.0.5 - Refresh token before request if token is expired - 05/09/2021
- v2.0.0 - Added Enhanced User Library Functions - 08/16/2023

## Authors

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
setup(
name='apple-music-python',
url='https://github.com/j-jacobson/apple-music-python',
version='1.0.5',
version='2.0.0',
packages=['applemusicpy'],
license='LICENSE.txt',
author='Matt Palazzolo, Jonathan Jacobson',
Expand Down

0 comments on commit 3833163

Please sign in to comment.