People pagination fix - #23
Merged
Merged
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #23 +/- ##
=======================================
Coverage ? 46.25%
=======================================
Files ? 36
Lines ? 5816
Branches ? 0
=======================================
Hits ? 2690
Misses ? 2720
Partials ? 406 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 Description, Motivation, and Context
Fixes typed pagination for the People API.
people.Client.List()returns a*people.PeoplePage, but the embedded genericwebexsdk.Page.Next()andPrev()methods return*webexsdk.Page. This prevents callers from assigning the result back to their*people.PeoplePagevariable and loses the typed[]people.Personitems after the first page.This change adds typed
Next()andPrev()methods toPeoplePage. Both methods retain the existing generic pagination behavior while decoding each result into[]Person. The initialList()response and subsequent pages now share the same conversion helper, avoiding duplicated decoding logic.It also corrects the README pagination example to use the
HasNextboolean field without calling it as a method.Existing caller code now compiles unchanged:
📖 Issues and Related PRs
🖼 Screenshots
Not applicable; this change does not modify the UI.
🌮 How This Was Tested
Added a regression test that:
nextlink and verifies typedPersonitems.prevlink and verifies typedPersonitems.Validation commands:
Required Items Complete
Security
Not applicable. This change does not modify authentication, authorization, credential handling, network endpoints, or stored data.