Skip to content

Commit

Permalink
Merge pull request #42 from hudsonbrendon/fix/track-snippet-get
Browse files Browse the repository at this point in the history
fix: refactor method track_snippet_get
  • Loading branch information
hudsonbrendon authored Jan 8, 2025
2 parents df6ddbc + 677bbb0 commit fec352a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pymusixmatch/musixmatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def track_lyrics_get(self, track_id: str = "", commontrack_id: str = "") -> dict
)
return data

def track_snippet_get(self, track_id, _format="json"):
def track_snippet_get(self, track_id: str) -> dict:
"""Get the snippet for a given track.
A lyrics snippet is a very short representation of a song lyrics.
Expand All @@ -256,11 +256,10 @@ def track_snippet_get(self, track_id, _format="json"):
Parameters:
track_id - The musiXmatch track id.
format - Decide the output type json or xml (default json).
track_id (str): The musiXmatch track id.
"""
data = self._request(
self._get_url(f"track.snippet.get?track_id={track_id}&format={_format}"),
self._get_url(f"track.snippet.get?track_id={track_id}"),
)
return data

Expand Down

0 comments on commit fec352a

Please sign in to comment.