Tags
add_tag
async
add_tag(
auth: Annotated[
Auth, Depends(authorize(HYBRID, [TAG_EDITOR]))
],
db: Annotated[Session, Depends(get_db)],
body: TagCreateBody,
) -> TagResponse
Add a new tag with given details.
args:
-
auth: Authentication details
-
db: Database session
-
body: Tag creation details
returns:
- TagResponse: Details of the created tag
add_tag_depr
async
add_tag_depr(
auth: Annotated[
Auth, Depends(authorize(HYBRID, [TAG_EDITOR]))
],
db: Annotated[Session, Depends(get_db)],
body: TagCreateBody,
) -> TagResponse
Deprecated. Add a new tag using the old route.
args:
-
auth: Authentication details
-
db: Database session
-
body: Tag creation details (TagCreateBody)
returns:
- TagResponse: Details of the created tag
delete_tag
async
delete_tag(
auth: Annotated[
Auth, Depends(authorize(HYBRID, [SITE_ADMIN]))
],
db: Annotated[Session, Depends(get_db)],
tag_id: Annotated[int, Path(alias=tagId)],
) -> TagDeleteResponse
Delete a specific tag.
args:
-
auth: Authentication details
-
db: Database session
-
tag_id: ID of the tag to delete
returns:
- TagDeleteResponse: Confirmation of the tag deletion
delete_tag_depr
async
delete_tag_depr(
auth: Annotated[
Auth, Depends(authorize(HYBRID, [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.
args:
-
auth: Authentication details
-
db: Database session
-
tag_id: ID of the tag to delete
returns:
- TagDeleteResponse: Confirmation of the tag deletion
get_tags
async
get_tags(
auth: Annotated[Auth, Depends(authorize(HYBRID))],
db: Annotated[Session, Depends(get_db)],
) -> TagGetResponse
Retrieve a list of all tags.
args:
-
auth: Authentication details
-
db: Database session
returns:
- TagGetResponse: List of all tags
search_tags
async
search_tags(
auth: Annotated[Auth, Depends(authorize(HYBRID))],
db: Annotated[Session, Depends(get_db)],
tag_search_term: Annotated[
str, Path(alias=tagSearchTerm)
],
) -> dict
Search for tags using a specific search term.
args:
-
auth: Authentication details
-
db: Database session
-
tag_search_term: Search term for finding tags
returns:
- dict: Dictionary containing search results
update_tag
async
update_tag(
auth: Annotated[
Auth, Depends(authorize(HYBRID, [SITE_ADMIN]))
],
db: Annotated[Session, Depends(get_db)],
body: TagUpdateBody,
tag_id: Annotated[int, Path(alias=tagId)],
) -> TagResponse
Edit details of a specific tag.
args:
-
auth: Authentication details
-
db: Database session
-
body: Tag update details (TagUpdateBody)
-
tag_id: ID of the tag to update
returns:
- TagResponse: Details of the updated tag
update_tag_depr
async
update_tag_depr(
auth: Annotated[
Auth, Depends(authorize(HYBRID, [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.
args:
-
auth: Authentication details
-
db: Database session
-
body: Tag update details
-
tag_id: ID of the tag to update
returns:
- TagResponse: Details of the updated tag
view_tag
async
view_tag(
auth: Annotated[Auth, Depends(authorize(HYBRID))],
db: Annotated[Session, Depends(get_db)],
tag_id: Annotated[int, Path(alias=tagId)],
) -> TagViewResponse
View details of a specific tag.
args:
-
auth: Authentication details
-
db: Database session
-
tag_id: ID of the tag to view
returns:
- TagViewResponse: Detailed information of the specified tag
view_tag_depr
async
view_tag_depr(
auth: Annotated[Auth, Depends(authorize(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.
args:
-
auth: Authentication details
-
db: Database session
-
tag_id: ID of the tag to view
returns:
- TagViewResponse: Detailed information of the specified tag