You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor Endpoints: Introduce Strategy Pattern for Params and DRY List Logic
- **Strategies:** Introduced `MappingParamProcessor` and `ParamRule` for declarative parameter processing, and `StudyKeyStrategy` (`Keep`/`Pop`) for handling study key extraction.
- **Refactoring:** Updated `ParamMixin` to use `StudyKeyStrategy`, replacing `_pop_study_filter` boolean logic.
- **Cleanup:** Refactored `UsersParamProcessor` and `RecordsParamProcessor` to use `MappingParamProcessor`. Updated `UsersEndpoint` and `RecordsEndpoint` configuration.
- **DRY:** Extracted `_create_paginator_and_parser` in `ListEndpointMixin` to unify setup logic for sync and async list operations.
- **Safety:** Maintained backward compatibility for legacy endpoints not explicitly updated.
Verified with full test suite passing.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
0 commit comments