Skip to content

Sightings

add_sighting async

add_sighting(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID, [Permission.SIGHTING]
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    body: SightingCreateBody,
) -> list[SightingAttributesResponse]

Add a new sighting for each given value.

Input:

  • auth: Authentication details

  • db: Database session

  • body: Sighting creation data

Output:

  • Details of the new sighting

add_sighting_depr async

add_sighting_depr(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID, [Permission.SIGHTING]
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    body: SightingCreateBody,
) -> list[SightingAttributesResponse]

Deprecated. Add a new sighting using the old route.

Input:

  • auth: Authentication details

  • db: Database session

  • body: Sighting creation data

Output:

  • List of sighting attributes

add_sightings_at_index async

add_sightings_at_index(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID, [Permission.SIGHTING]
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    attribute_id: Annotated[int, Path(alias=attributeId)],
) -> SightingAttributesResponse

Add a new sighting for a specific attribute.

Input:

  • auth: Authentication

  • db: Database session

  • attribute_id: ID of the attribute

Output:

  • Details of new sightings

add_sightings_at_index_depr async

add_sightings_at_index_depr(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID, [Permission.SIGHTING]
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    attribute_id: Annotated[int, Path(alias=attributeId)],
) -> SightingAttributesResponse

Deprecated. Add a new sighting for a specific attribute using the old route.

Input:

  • auth: Authentication details

  • db: Database session

  • attribute_id: ID of the attribute

Output:

  • Details of the new sightings

delete_sighting async

delete_sighting(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID, [Permission.SIGHTING]
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    sighting_id: Annotated[int, Path(alias=sightingId)],
) -> StandardStatusResponse

Delete a specific sighting.

Input:

  • auth: Authentication details

  • db: Database session

  • sighting_id: ID of the sighting

Output:

  • Status response indicating success or failure

delete_sighting_depr async

delete_sighting_depr(
    auth: Annotated[
        Auth,
        Depends(
            authorize(
                AuthStrategy.HYBRID, [Permission.SIGHTING]
            )
        ),
    ],
    db: Annotated[Session, Depends(get_db)],
    sighting_id: Annotated[int, Path(alias=sightingId)],
) -> StandardStatusResponse

Deprecated. Delete a specific sighting using the old route.

Input:

  • auth: Authentication details

  • db: Database session

  • sighting_id: ID of the sighting

Output:

  • Status response indicating success or failure

get_sightings async

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

Retrieve a list of all sightings.

Input:

  • auth: Authentication details

  • db: Database session

Output:

  • Status response indicating success or failure

get_sightings_at_index async

get_sightings_at_index(
    auth: Annotated[
        Auth, Depends(authorize(AuthStrategy.HYBRID))
    ],
    db: Annotated[Session, Depends(get_db)],
    event_id: Annotated[int, Path(alias=eventId)],
) -> list[SightingAttributesResponse]

Retrieve all sightings associated with a specific event ID.

Input:

  • auth: Authentication details

  • db: Database session

  • event_id: ID of the event

Output:

  • Details of the sightings at index

get_sightings_at_index_depr async

get_sightings_at_index_depr(
    auth: Annotated[
        Auth, Depends(authorize(AuthStrategy.HYBRID))
    ],
    db: Annotated[Session, Depends(get_db)],
    event_id: Annotated[int, Path(alias=eventId)],
) -> list[SightingAttributesResponse]

Deprecated. Retrieve all sightings associated with a specific event ID using the old route.

Input:

  • auth: Authentication details

  • db: Database session

  • event_id: ID of the event

Output:

  • Details of the sightings at index