Skip to content

Commit

Permalink
Added descriptions to all parameters used for favorite tracks. Use un…
Browse files Browse the repository at this point in the history
…derscore for parameter names.
  • Loading branch information
tehkillerbee committed Nov 27, 2023
1 parent 598d64c commit bf55b4b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions tidalapi/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,16 +340,26 @@ def playlists(
),
)

def tracks(self, limit: Optional[int] = None, offset: int = 0, order: str = "NAME", orderDirection: str = "ASC") -> List["Track"]:
def tracks(
self,
limit: Optional[int] = None,
offset: int = 0,
order: str = "NAME",
order_direction: str = "ASC",
) -> List["Track"]:
"""Get the users favorite tracks.
:param limit: Optional; The amount of items you want returned.
:param offset: The index of the first item you want included.
:param order: A :class:`str` describing the ordering type when returning the user favorite tracks. eg.: "NAME, "DATE"
:param order_direction: A :class:`str` describing the ordering direction when sorting by `order`. eg.: "ASC", "DESC"
:return: A :class:`list` of :class:`~tidalapi.media.Track` objects containing all of the favorite tracks.
"""
params = {
"limit": limit,
"offset": offset,
"order": order,
"orderDirection": orderDirection
"orderDirection": order_direction,
}

return cast(
Expand Down

0 comments on commit bf55b4b

Please sign in to comment.