Add timeline API options
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/pr-dev Build started...

This commit is contained in:
spsaefan
2026-06-08 01:25:03 +02:00
parent 3325590735
commit 770f2b31e1
+13
View File
@@ -101,11 +101,24 @@ async def get_primary_topic_counts(
async def get_topics_by_time_by_author(
author_id: Annotated[str, Path(description="The author id, for example A5023888391.")],
max_topics_per_year: Annotated[int, Query(description="The maximum number of topics per year.", ge=1, le=20)] = 3,
target_publications: Annotated[
int,
Query(
description="Target number of publications used for the timeline. Complete years are always included.",
ge=1,
),
] = 300,
include_all: Annotated[
bool,
Query(description="If true, all publications are used for the timeline."),
] = False,
principal: security.Principal = Depends(security.roles_allowed(["SUPER_ADMIN", "UNI_ADMIN"])),
):
return await logic.get_topics_by_time_by_author(
author_id,
max_topics_per_year=max_topics_per_year,
target_publications=target_publications,
include_all=include_all,
)