Skip to content

Commit

Permalink
fix: rename argument for Playlist.reorder_tracks back to order to…
Browse files Browse the repository at this point in the history
… match parameter name from REST API
  • Loading branch information
browniebroke committed May 10, 2023
1 parent 4e0c3e0 commit ea469e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/deezer/resources/playlist.py
Expand Up @@ -92,15 +92,15 @@ def delete_tracks(self, tracks: Iterable[int | Track], **kwargs) -> bool:
"DELETE", f"playlist/{self.id}/tracks", songs=track_ids_str, **kwargs
)

def reorder_tracks(self, ordered_tracks: Iterable[int | Track], **kwargs) -> bool:
def reorder_tracks(self, order: Iterable[int | Track], **kwargs) -> bool:
"""
Reorder the tracks of a playlist.
:param ordered_tracks: An iterable of :class:`Track <deezer.Track>` instances
or their IDs in the wished order.
:param order: An iterable of :class:`Track <deezer.Track>` instances
or their IDs in the wished order.
:returns: a boolean that tells if the operation was successful
"""
order_track_ids_str = ",".join(map(str, gen_ids(ordered_tracks)))
order_track_ids_str = ",".join(map(str, gen_ids(order)))
return self.client.request(
"POST", f"playlist/{self.id}/tracks", order=order_track_ids_str, **kwargs
)

0 comments on commit ea469e9

Please sign in to comment.