Skip to content

Fix collection/wishlist pagination returning no results#20

Merged
ALERTua merged 1 commit intoALERTua:mainfrom
teancom:fix/collection-pagination
Mar 27, 2026
Merged

Fix collection/wishlist pagination returning no results#20
ALERTua merged 1 commit intoALERTua:mainfrom
teancom:fix/collection-pagination

Conversation

@teancom
Copy link
Copy Markdown
Contributor

@teancom teancom commented Mar 27, 2026

The collection and wishlist endpoints use "more_available" (not "has_more") to indicate additional pages. The library was reading a nonexistent key, always getting False, so only the first page was ever returned.

Also use the last item's token as the pagination cursor instead of the response-level "last_token", which overshoots and causes duplicate items across pages.

Added token field to CollectionItem model for consistency with FollowingItem and FanItem.

The collection and wishlist endpoints use "more_available" (not "has_more")
to indicate additional pages. The library was reading a nonexistent key,
always getting False, so only the first page was ever returned.

Also use the last item's token as the pagination cursor instead of the
response-level "last_token", which overshoots and causes duplicate items
across pages.

Added token field to CollectionItem model for consistency with
FollowingItem and FanItem.
@ALERTua
Copy link
Copy Markdown
Owner

ALERTua commented Mar 27, 2026

Thank you for your contribution and your findings. I will expand the tests and create a new release in the morning. The new release is expected to be created <12 hours from now. I will update this issue.

@ALERTua ALERTua merged commit b2b94a6 into ALERTua:main Mar 27, 2026
4 of 5 checks passed
@ALERTua
Copy link
Copy Markdown
Owner

ALERTua commented Mar 27, 2026

https://github.com/ALERTua/bandcamp_async_api/releases/tag/0.1.1
pypi published
Thank you again for your contribution

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

Successfully merging this pull request may close these issues.

2 participants