Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attributes missing from Song/Album/Artist #208

Open
allerter opened this issue Apr 25, 2021 · 0 comments
Open

Attributes missing from Song/Album/Artist #208

allerter opened this issue Apr 25, 2021 · 0 comments

Comments

@allerter
Copy link
Contributor

allerter commented Apr 25, 2021

Because of the get_full_info parameter in genius.search_song, we're not able to add all attributes to the Song object (e.g. album). Although they will be available from Song.to_dict(), it'd be nice to be able to access them as attributes. There are two ways to deal with this properly:

  • Removing get_full_info altogether and update Song to have all fields.
    • advantages: Reduced complexity. No need to create and maintain two classes. Closer to the API if we discard the keys from genius.search_all and only stick to what genius.song gives us.
    • disadvantages: extra request to get the song info using genius.song.
  • Breaking Song into two types: SearchSong and FullSong.
    • advantages: no extra request needed to get full song info if get_full_info=False.
    • disadvantages: Creating and maintaining two classes. SearchSong will have attributes from the Public/Web API.

I haven't taken a close look at search_album and search_artist, but the above could probably be said about those too.

@allerter allerter changed the title Attributes missing from Genius.search_song Attributes missing from Song Apr 25, 2021
@allerter allerter changed the title Attributes missing from Song Attributes missing from Song/Album/Artist Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant