From b984364f4ba26141e194b616f9ceb7b2d718d0fe Mon Sep 17 00:00:00 2001 From: Dr-Blank <64108942+Dr-Blank@users.noreply.github.com> Date: Tue, 10 Oct 2023 03:43:53 -0400 Subject: [PATCH] reflect model changes in README --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f9ce282..ab34dac 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ lyrics = api.get_lyrics( ) # Print the lyrics -print(lyrics["syncedLyrics"]) +print(lyrics.synced_lyrics or lyrics.plain_lyrics) # Search for a lyrics results = api.search_lyrics( @@ -52,15 +52,13 @@ results = api.search_lyrics( # Print the results for result in results: - print(result["id"]) - print(result["artistName"]) - print(result["albumName"]) + print(f"{result.artist_name} - {result.track_name} ({result.album_name})") # Get lyrics by ID -lyrics = api.get_lyrics_by_id(lrclib_id=results[0]["id"]) +lyrics = api.get_lyrics_by_id(lrclib_id=results[0].id) # Print the lyrics -print(lyrics["syncedLyrics"] or lyrics["plainLyrics"]) +print(lyrics.synced_lyrics or lyrics.plain_lyrics) ``` ## Features in Development