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

[lib/c#] Return iterator information in list endpoints #1203

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

svix-lucho
Copy link
Contributor

@svix-lucho svix-lucho commented Feb 12, 2024

Motivation

Our list endpoints, e.g., Endpoint.List, Endpoint.ListAsync, do not return pagination data, which makes the library unusable if results are paginated. We need to return the full response, and not just the data portion of it.

Solution

Return the full response (data, iterator and done) from the listing methods.

This is a breaking change. Users upgrading to the latest version of the C# lib will need to update their usage of these endpoints. var res = Application.List(...) becomes var res = Application.List(...).Data.

Fixes #1200

@svix-lucho svix-lucho linked an issue Feb 12, 2024 that may be closed by this pull request
@svix-lucho svix-lucho marked this pull request as ready for review February 12, 2024 19:46
@svix-lucho svix-lucho force-pushed the lucho/list-in-c-sharp branch from cc1e941 to 0d582ad Compare February 12, 2024 19:47
@svix-lucho svix-lucho requested a review from a team February 12, 2024 19:47
Copy link
Contributor

@svix-onelson svix-onelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it does what you mention in the description. LGTM.
:shipit:

@svix-lucho svix-lucho merged commit 2ee23a0 into main Feb 13, 2024
2 checks passed
@svix-lucho svix-lucho deleted the lucho/list-in-c-sharp branch February 13, 2024 15:08
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.

csharp: List endpoint responses missing pagination data
2 participants