Get all the sightings:
{
sightings: Sighting[] // list of "Sighting" objects (defined below)
}
Information about a single sighting:
{
id: number,
date: string,
location: Location, // the location of the sighting (Location object, defined below)
species: Species[]?, // optional list of "Species" objects (defined below) (not given if unknown)
photoUrl: string?, // URL of a photo of the sighting
email: string? // email address of the person who submitted the sighting
}
A list of all the species in the database:
{
species: Species[] // list of "Species" objects (defined below)
}
Gets a specific species:
{
id: number,
name: string,
latinName: string,
photoUrl: string?,
description: string?,
endangeredStatus: string,
sightings: Sighting[] // a list of all the sightings of this species (those Sighting objects do NOT include the species field)
}
Gets a specific species, searching by name or latin name (does case-insensitive substring matching):
{
id, number,
name: string,
latinName: string,
photoUrl: string?,
description: string?,
endangeredStatus: string,
sightings: Sighting[] // a list of all the sightings of this species (those Sighting objects do NOT include the species field)
}
Get all the locations:
{
items: Location[], // list of "Location" objects (defined below)
}
Returns a specific location:
{
id: number,
latitude: number, // ranges fron -90.0 to 90.0
longitude: number, // ranges from -180.0 to 180.0
name: string?, // the common name of the location (if it has one!)
description: string?,
sightings: Sightings[] // a list of all sightings at this location (those Sighting objects do NOT include the location field)
}
Returns the location in the database closest to the provided latitude (-90.0 to 90.0) and longitude (-180.0 to 180.0):
{
id: number,
latitude: string,
longitude: string,
name: string?, // the common name of the location (if it has one!)
description: string?,
sightings: Sightings[] // a list of all sightings at this location (those Sighting objects do NOT include the location field)
}