Add timeline API options
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user