Add member list pagination and search support to API
This is change includes API support so that we can both a) load the members list page incrementally and b) search for not-yet-loaded members from the members list page.
This changeset contains the following fundamental changes (with related updates to tests):
- Updated the AttendeeService to take in a list of members to determine eligibility, rather than always returning a list of all members. Required to support pagination.
- Added pagination support to the
member/list
endpoint. If apage_size
param is sent up, it will only return up topage_size
results. The new return format withcursor
andhas_more
is gated based on whether you pass uppage_size
(for backwards compatibility with the frontend). - Added a new
/member/search
endpoint which accepts aquery
parameter. This endpoint will return results where the query string is a substring of first, last or email of a member. It also supports pagination. - Per discussion with @jeffmay and @dbolson, some refactoring to move more business logic into the
MemberService
and keep mostly "pure" sqlalchemy queries in theMemberRepo
Edited by Anna Geiduschek