mirror of
https://github.com/ramsayleung/rspotify.git
synced 2026-04-25 23:45:52 +03:00
[GH-ISSUE #414] Uri enum #138
Labels
No labels
Stale
bug
discussion
enhancement
good first issue
good first issue
help wanted
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rspotify#138
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @blueforesticarus on GitHub (May 25, 2023).
Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/414
Is your feature request related to a problem? Please describe.
I am making a cli for testing parts of my application and want to pass a spotify uri as an arg. A way to parse this as a valid spotify uri, then match on it, would be useful. It would also serve as a useful type for parts of my application which are generic over Album, Playlist, or Track, of which there are many.
Describe the solution you'd like
It would be convenient to have an Uri enum covering all the Id types, so we can always parse a uri, and match over the various ids.
Describe alternatives you've considered
Manually calling parse_uri and matching over the result.
Alternatively Uri could be a struct with id and type. Though I think this is maybe more cumbersome for matching.
@ramsayleung commented on GitHub (May 25, 2023):
Please follow the issue template to describe your problem with context information, it would be helpful for others to understand your issue.
@blueforesticarus commented on GitHub (May 26, 2023):
I think this is a sufficient implementation for what I am talking about (if you agree it is desirable). Although someone may have suggestions.
Someone could argue that Uri should be a struct with id and type, perhaps with another type for the enum.
@ramsayleung commented on GitHub (Jun 7, 2023):
I think it makes sense to me, feel free to create a PR :)
@github-actions[bot] commented on GitHub (Dec 5, 2023):
Message to comment on stale issues. If none provided, will not mark issues stale
@github-actions[bot] commented on GitHub (Nov 28, 2025):
Message to comment on stale issues. If none provided, will not mark issues stale