Skip to content

Commit

Permalink
Merge pull request #206 from Jimmyscene/master
Browse files Browse the repository at this point in the history
Update favorites.tracks to accept order and orderDirection params
  • Loading branch information
tehkillerbee authored Nov 27, 2023
2 parents 9d146dd + 7fc4e46 commit 598d64c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tidalapi/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,18 @@ def playlists(
),
)

def tracks(self, limit: Optional[int] = None, offset: int = 0) -> List["Track"]:
def tracks(self, limit: Optional[int] = None, offset: int = 0, order: str = "NAME", orderDirection: str = "ASC") -> List["Track"]:
"""Get the users favorite tracks.
:return: A :class:`list` of :class:`~tidalapi.media.Track` objects containing all of the favorite tracks.
"""
params = {"limit": limit, "offset": offset}
params = {
"limit": limit,
"offset": offset,
"order": order,
"orderDirection": orderDirection
}

return cast(
List["Track"],
self.requests.map_request(
Expand Down

0 comments on commit 598d64c

Please sign in to comment.