Skip to content

Releases: CyanBook/spotipy2

v0.6 - New methods, types, authentication flows and more

09 Aug 18:15
fde051b
Compare
Choose a tag to compare

New features

Changes

  • Simplified types are removed, normal types have some fields with None as the default value
  • All types are now @dataclass objects
  • More control on JSON to types conversion (new auto_conversion & recursive_conversion parameters)

Full Changelog: v0.5...v0.6

v0.5 - Caching with MongoDB

06 Jan 00:14
Compare
Choose a tag to compare

Caching is now available

Use cases

If your program is very dependent on repetitive simple GET requests like get_track or get_album, this feature is for you!
You can use that database for other projects since all the data are stored in plain JSON from Spotify.

How does it work?

Instead of having to call the Spotify API every single time (increasing latency), it searches first in MongoDB's collection and sees if there's an endpoint matching the current request. If so, it returns that item, and the entire request is completed in less than 0.1 seconds.

How to enable it?

  1. Install MongoDB
  2. Create a database and a collection called spotipy2
  3. Set the mongodb_uri parameter (Make sure to add the default database!)
  4. (Optional) Add an ascending index for the _endpoint field
  5. You're done!

v0.4 - Albums & search added

30 Mar 16:59
Compare
Choose a tag to compare

What's new

New functions and types for Album object and search function added + bug fixes and enhancements

New types

Album - AlbumObject
SimplifiedAlbum - SimplifiedAlbumObject
SimplifiedTrackObject - SimplifiedTrackObject

New methods

search - Search for an Item
get_albums - Get Multiple Albums
get_album - Get an Album
get_album_tracks - Get an Album's Tracks

Fixes

  • get_artist_top_tracks's market parameter is now passed correctly

Minor enhancements

  • Improved type hinting
  • Added a wrapper function added to every function with optional parameters to avoid passing dicts with None values
  • Added a types.BaseType which is the main class where every type derivates from

v0.3 - Artist and general improvements

18 Mar 18:01
d4113d6
Compare
Choose a tag to compare

What's new

  • Auto deploy for docs and PyPi
  • Added link support

New types

New methods

Breaking changes

  • Type.from_dict is now synchronous, since async isn't needed for it

v0.2 - The first steps

02 Dec 13:29
Compare
Choose a tag to compare

What's new

Welcome to the first stable release of this package!

A Client

Spotify is the new client class of spotipy2
You can use it to make API requests to Spotify servers

Authentication

For authenticating Client is now available the Client Credentials Flow
You can use it via ClientCredentialsFlow

Exceptions

A general exception class called SpotifyException has been added to handle every error from Spotify API
More info on error codes here

New types

Track - Track object (full)
Artist - Artist object (full)

New methods

get_track - Get a Track
get_tracks - Get Several Tracks
get_artist - Get an Artist
get_artists - Get Several Artists