Skip to content

Take credentials only from apply in the pagination converters - #237

Open
SeanTAllen wants to merge 1 commit into
mainfrom
issue-219-converter-credentials
Open

SeanTAllen wants to merge 1 commit into
mainfrom
issue-219-converter-credentials

Conversation

@SeanTAllen

Copy link
Copy Markdown
Member

PaginatedListJSONConverter and PaginatedSearchJSONConverter took
credentials in the constructor and again in apply. Item conversion used
the apply credentials, but the page's prev_page() and next_page() used
the constructor's, so a caller could build a page whose items make
requests with one account and whose next page uses another.

The constructors no longer take credentials. The item converter and the
page both get the credentials passed to apply, which is how
JSONConverter takes them.

Closes #219

PaginatedListJSONConverter and PaginatedSearchJSONConverter took
credentials in the constructor and again in apply. Item conversion used
the apply credentials, but the page's prev_page() and next_page() used
the constructor's, so a caller could build a page whose items make
requests with one account and whose next page uses another.

The constructors no longer take credentials. The item converter and the
page both get the credentials passed to apply, which is how
JSONConverter takes them.

Closes #219
@SeanTAllen SeanTAllen added do not merge This PR should not be merged at this time changelog - changed Automatically add "Changed" CHANGELOG entry on merge labels Dec 4, 2026
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Dec 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog - changed Automatically add "Changed" CHANGELOG entry on merge discuss during sync Should be discussed during an upcoming sync do not merge This PR should not be merged at this time

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pagination converters accept different credentials for a page and its items

2 participants