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

get_track returns list rather than data.frame and only works for a single id #184

Open
yogat3ch opened this issue Oct 2, 2022 · 1 comment
Assignees

Comments

@yogat3ch
Copy link
Contributor

yogat3ch commented Oct 2, 2022

A simple fix is to update the documentation such that the return value indicates it's a list.
However, an optimal solution is to perform reformatting such that the list returned becomes a single row data.frame compatible with formatting of the tracks.items as returned by get_playlist to allow for row binding.

@antaldaniel
Copy link
Collaborator

@yogat3ch, thanks for your contributors; you are now named as a contributor in the new CRAN release. I must admit that my mind skipped this issue. I put it on the new development version 2.2.4.0001 (I was in a hurry as the genius dependency took the package out of CRAN.)

This was a documentation issue, and I corrected the documentation. If you want to, you can build a new function for that, but for me, that is a new function. The get_playlist() returns a list that will not fit into a tidy dataset. The data frame you have in mind only has the $items part of the list and discards the metadata. That would be more of a get_playlist_track_items() to me. But it depends on the user's data collection, I save the metadata to a tidy dataset and an item to another.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants