2.0.0 - The future is here
This release significantly improves the overall structure of the library and provides quality of life enhancements to various tasks. Most notably, submodules were removed in favor of a flat structure. Everything is now imported from the top level with the exception of models
.
Removed
Deprecated
- Playlist API - methods specifically for playlist tracks and
episodes_as_tracks
argument ofSpotify.playlist
(#178)
Added
- Authentication - a list of scopes and strings is accepted in
scope
arguments (#81) Scope
operations were expanded to properly handle all combinations ofstr
,scope
andScope
(#177)- Playlist API - new methods to fully support episodes in playlists. The new endpoints are direct counterparts to
playlist_tracks_*
methods. (#178)
Changed
Import structure
Submodules were removed in favor of a flat structure. In addition to simply relocating objects, some changes were made as well. (#81)
- Options for senders and configuration are now set at the top level
AuthorisationScopes
was renamed toscope
, and its aliasscopes
is no longer available- Ready-made scopes
read
,write
andevery
are now accessed via thescope
enumeration
Response models
These changes aim to make models consistent and serialisation clear. (#149)
- The JSON encoder used internally was made private
- Hierarchies and names of model base classes and member types changed
- Instead of using
str
, models are now converted to JSON using theirjson
method - As a result of the change above, the
repr
of models can be viewed simply withprint
. Therepr
of model lists was significantly improved. Viewing attributes of models produces consistent results. - The
asbuiltin
method replacesasdict
for models and was also added for lists of models. Enumerations and timestamps are no longer preserved in the conversion. pprint
output is now compact by default
Playlist items
Boolean attributes of FullTrack
and FullEpisode
on a playlist were previously also available elsewhere, but had None
values. They were removed. The booleans are still available in playlist-related calls with the new FullPlaylistTrack
and FullPlaylistEpisode
. LocalPlaylistTrack
now also provides these booleans. (#170)
Miscellaneous
- Exceptions thrown in authentication now match client. Because of that,
OAuthError
was removed. Errors now inherit from a common base class. (#154) Token.scope
andRefreshingToken.scope
now return aScope
instead of a string. (#177)- Default sender changed from
TransientSender
toPersistentSender
, also affectsClient
behavior (#141)