Skip to content

Tags

add_tag async

add_tag(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID, [Permission.TAG_EDITOR]
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    body: TagCreateBody,
) -> TagResponse

Add a new tag with given details.

Input:

  • auth: Authentication details

  • db: Database session

  • body: Tag creation details

Output:

  • TagResponse: Details of the created tag

add_tag_depr async

add_tag_depr(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID, [Permission.TAG_EDITOR]
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    body: TagCreateBody,
) -> TagResponse

Deprecated. Add a new tag using the old route.

Input:

  • auth: Authentication details

  • db: Database session

  • body: Tag creation details (TagCreateBody)

Output:

  • TagResponse: Details of the created tag

delete_tag async

delete_tag(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID, [Permission.SITE_ADMIN]
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    tag_id: Annotated[int, Path(alias=tagId)],
) -> TagDeleteResponse

Delete a specific tag.

Input:

  • auth: Authentication details

  • db: Database session

  • tag_id: ID of the tag to delete

Output:

  • TagDeleteResponse: Confirmation of the tag deletion

delete_tag_depr async

delete_tag_depr(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID, [Permission.SITE_ADMIN]
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    tag_id: Annotated[int, Path(alias=tagId)],
) -> TagDeleteResponse

Deprecated. Delete a specific tag using the old route.

Input:

  • auth: Authentication details

  • db: Database session

  • tag_id: ID of the tag to delete

Output:

  • TagDeleteResponse: Confirmation of the tag deletion

get_tags async

get_tags(
    auth: Annotated[
        Auth, Depends(authorize(AuthStrategy.HYBRID))
    ],
    db: Annotated[Session, Depends(get_db)],
) -> TagGetResponse

Retrieve a list of all tags.

Input:

  • auth: Authentication details

  • db: Database session

Output:

  • TagGetResponse: List of all tags

search_tags async

search_tags(
    auth: Annotated[
        Auth, Depends(authorize(AuthStrategy.HYBRID))
    ],
    db: Annotated[Session, Depends(get_db)],
    tag_search_term: Annotated[
        str, Path(alias=tagSearchTerm)
    ],
) -> dict

Search for tags using a specific search term.

Input:

  • auth: Authentication details

  • db: Database session

  • tag_search_term: Search term for finding tags

Output:

  • dict: Dictionary containing search results

update_tag async

update_tag(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID, [Permission.SITE_ADMIN]
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    body: TagUpdateBody,
    tag_id: Annotated[int, Path(alias=tagId)],
) -> TagResponse

Edit details of a specific tag.

Input:

  • auth: Authentication details

  • db: Database session

  • body: Tag update details (TagUpdateBody)

  • tag_id: ID of the tag to update

Output:

  • TagResponse: Details of the updated tag

update_tag_depr async

update_tag_depr(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID, [Permission.SITE_ADMIN]
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    body: TagUpdateBody,
    tag_id: Annotated[int, Path(alias=tagId)],
) -> TagResponse

Deprecated. Edit a specific tag using the old route.

Input:

  • auth: Authentication details

  • db: Database session

  • body: Tag update details

  • tag_id: ID of the tag to update

Output:

  • TagResponse: Details of the updated tag

view_tag async

view_tag(
    auth: Annotated[
        Auth, Depends(authorize(AuthStrategy.HYBRID))
    ],
    db: Annotated[Session, Depends(get_db)],
    tag_id: Annotated[int, Path(alias=tagId)],
) -> TagViewResponse

View details of a specific tag.

Input:

  • auth: Authentication details

  • db: Database session

  • tag_id: ID of the tag to view

Output:

  • TagViewResponse: Detailed information of the specified tag

view_tag_depr async

view_tag_depr(
    auth: Annotated[
        Auth, Depends(authorize(AuthStrategy.HYBRID))
    ],
    db: Annotated[Session, Depends(get_db)],
    tag_id: Annotated[int, Path(alias=tagId)],
) -> TagViewResponse

Deprecated. View details of a specific tag using the old route.

Input:

  • auth: Authentication details

  • db: Database session

  • tag_id: ID of the tag to view

Output:

  • TagViewResponse: Detailed information of the specified tag