From 4c79e321bfdac62ade95540c1aaf047d6f6fa4a9 Mon Sep 17 00:00:00 2001 From: Marcos Prieto Date: Wed, 22 Nov 2023 09:45:16 +0100 Subject: [PATCH] Document bulk api service group_search --- h/services/bulk_api/group.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/h/services/bulk_api/group.py b/h/services/bulk_api/group.py index 219c191c6f2..0b016823ed5 100644 --- a/h/services/bulk_api/group.py +++ b/h/services/bulk_api/group.py @@ -22,6 +22,16 @@ def __init__(self, db: Session): def group_search( self, groups: List[str], annotations_created: dict ) -> List[BulkGroup]: + """ + Get a list of groups. + + :param groups: List of "authority_provided_id" to filter groups by. + The returned groups will be a subset of this list. + :param annotations_created: Filter by groups with annotations created in this date range. + + :raises BadDateFilter: For poorly specified date conditions + """ + query = ( sa.select([Group.authority_provided_id]) .join(Annotation, Group.pubid == Annotation.groupid)