mirror of
https://github.com/ramsayleung/rspotify.git
synced 2026-04-26 07:55:55 +03:00
[GH-ISSUE #181] Current approach to iterate over a page #63
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#63
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 @JojiiOfficial on GitHub (Jan 31, 2021).
Original GitHub issue: https://github.com/ramsayleung/rspotify/issues/181
I'm currently at a point, where I need all "FullTrack" items of any playlist, by its id. A page gives information about the next one (if available) through a URL. I haven't seen any function in the documentation, which lets me retrieve the next page using this URL. I've seen #166 and I'm hoping to see this feature in rspotify in the future. But what is the best approach for now? Crawling the URL manually with
reqwest?@ramsayleung commented on GitHub (Feb 7, 2021):
Suppose that you are using the
playlist_tracksendpoint to get full details of the tracks of a playlist:And the page gives information about the next one though a URL like this:
For now, you have to parse the url and extract
limitandoffsetparameters, and recall theplaylist_tracksendpoint with settinglimitto 2 andoffsetto 2.I know it's a pity that it's not an elegant and ergonomic solution, probably this could solve the problem you meet :(
@JojiiOfficial commented on GitHub (Feb 7, 2021):
This sure helps for now, I'm really looking forward to #166 getting finished and merged. Thank you.