Sightings
add_sighting
async
add_sighting(
auth: Annotated[
Auth, Depends(authorize(HYBRID, [SIGHTING]))
],
db: Annotated[Session, Depends(get_db)],
body: SightingCreateBody,
) -> list[SightingAttributesResponse]
Add a new sighting for each given value.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
auth
|
Annotated[Auth, Depends(authorize(HYBRID, [SIGHTING]))]
|
Authentication details |
required |
db
|
Annotated[Session, Depends(get_db)]
|
Database session |
required |
body
|
SightingCreateBody
|
Sighting creation data |
required |
Returns:
Type | Description |
---|---|
list[SightingAttributesResponse]
|
details of the new sighting |
add_sighting_depr
async
add_sighting_depr(
auth: Annotated[
Auth, Depends(authorize(HYBRID, [SIGHTING]))
],
db: Annotated[Session, Depends(get_db)],
body: SightingCreateBody,
) -> list[SightingAttributesResponse]
Deprecated. Add a new sighting using the old route.
args:
-
auth: Authentication details
-
db: Database session
-
body: Sighting creation data
returns:
- List of sighting attributes
add_sightings_at_index
async
add_sightings_at_index(
auth: Annotated[
Auth, Depends(authorize(HYBRID, [SIGHTING]))
],
db: Annotated[Session, Depends(get_db)],
attribute_id: Annotated[
int | UUID, Path(alias=attributeId)
],
) -> SightingAttributesResponse
Add a new sighting for a specific attribute.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
auth
|
Annotated[Auth, Depends(authorize(HYBRID, [SIGHTING]))]
|
Authentication |
required |
db
|
Annotated[Session, Depends(get_db)]
|
Database session |
required |
attribute_id
|
Annotated[int | UUID, Path(alias=attributeId)]
|
ID or UUID of the attribute |
required |
Returns:
Type | Description |
---|---|
SightingAttributesResponse
|
details of new sightings |
add_sightings_at_index_depr
async
add_sightings_at_index_depr(
auth: Annotated[
Auth, Depends(authorize(HYBRID, [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.
args:
-
auth: Authentication details
-
db: Database session
-
attribute_id: ID of the attribute
returns:
- Details of the new sightings
delete_sighting
async
delete_sighting(
auth: Annotated[
Auth, Depends(authorize(HYBRID, [SIGHTING]))
],
db: Annotated[Session, Depends(get_db)],
sighting_id: Annotated[int, Path(alias=sightingId)],
) -> StandardStatusResponse
Delete a specific sighting.
args:
-
auth: Authentication details
-
db: Database session
-
sighting_id: ID of the sighting
returns:
- Status response indicating success or failure
delete_sighting_depr
async
delete_sighting_depr(
auth: Annotated[
Auth, Depends(authorize(HYBRID, [SIGHTING]))
],
db: Annotated[Session, Depends(get_db)],
sighting_id: Annotated[int, Path(alias=sightingId)],
) -> StandardStatusResponse
Deprecated. Delete a specific sighting, using the old route.
args:
-
auth: Authentication details
-
db: Database session
-
sighting_id: ID of the sighting
returns:
- Status response indicating success or failure
get_sightings
async
get_sightings(
auth: Annotated[Auth, Depends(authorize(HYBRID))],
db: Annotated[Session, Depends(get_db)],
) -> SightingsGetResponse
Retrieve a list of all sightings.
args:
-
auth: Authentication details
-
db: Database session
returns:
- Status response indicating success or failure
get_sightings_at_index
async
get_sightings_at_index(
auth: Annotated[Auth, Depends(authorize(HYBRID))],
db: Annotated[Session, Depends(get_db)],
event_id: Annotated[int | UUID, Path(alias=eventId)],
) -> list[SightingAttributesResponse]
Retrieve all sightings associated with a specific event ID or UUID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
auth
|
Annotated[Auth, Depends(authorize(HYBRID))]
|
Authentication |
required |
db
|
Annotated[Session, Depends(get_db)]
|
Database session |
required |
event_id
|
Annotated[int | UUID, Path(alias=eventId)]
|
ID or UUID of the event |
required |
Returns:
Type | Description |
---|---|
list[SightingAttributesResponse]
|
details of the sightings at index |
get_sightings_at_index_depr
async
get_sightings_at_index_depr(
auth: Annotated[Auth, Depends(authorize(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.
args:
-
auth: Authentication details
-
db: Database session
-
event_id: ID of the event
returns:
- Details of the sightings at index