Skip to content

Commit

Permalink
refactor: method track_richsync_get
Browse files Browse the repository at this point in the history
  • Loading branch information
hudsonbrendon committed Jan 10, 2025
1 parent 7060b6d commit 400490c
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions pymusixmatch/musixmatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,10 @@ def track_subtitle_get(

def track_richsync_get(
self,
track_id,
f_sync_length=None,
f_sync_length_max_deviation=None,
_format="json",
):
track_id: str,
f_sync_length: str = "",
f_sync_length_max_deviation: str = "",
) -> dict:
"""Get the Rich sync for a track.
A rich sync is an enhanced version of the
Expand All @@ -327,21 +326,19 @@ def track_richsync_get(
Parameters:
track_id - The musiXmatch track id.
f_sync_length - The desired length of the sync (seconds).
f_sync_length_max_deviation - The maximum deviation allowed.
track_id (str): The musiXmatch track id.
f_sync_length (str): The desired length of the sync (seconds).
f_sync_length_max_deviation (str): The maximum deviation allowed.
from the f_sync_length (seconds).
"""
data = self._request(
self._get_url(
"track.richsync.get?"
"track_id={}&f_sync_length={}"
"&f_sync_length_max_deviation={}"
"&format={}".format(
"&f_sync_length_max_deviation={}".format(
track_id,
f_sync_length,
f_sync_length_max_deviation,
_format,
),
),
)
Expand Down

0 comments on commit 400490c

Please sign in to comment.