@ -28,6 +28,8 @@ The open source iOS [GPS Logger](https://github.com/esripdx/GPS-Logger-iOS) will
To read a database, make a GET request as follows:
#### Get all data for a calendar day
`GET /api/query`
* token - (required) the read token for the database
@ -37,12 +39,28 @@ To read a database, make a GET request as follows:
* linestring - combine all the returned results into a GeoJSON linestring
* date - specify a date to return all data on that day (YYYY-mm-dd format)
#### Get the last location before a given timestamp
`GET /api/last`
* token - (required) the read token for the database
* tz - (optional, default UTC) timezone string (e.g. America/Los_Angeles) which will be used to determine the absolute start/end times for the day
* before - (optional, default to now) specify a full timestamp to return a single record before this date (the point returned will be no more than 24 hours before the given date)
* geocode - (optional) if "true", then the location found will be reverse geocoded using [Atlas](https://atlas.p3k.io) to find the city and timezone at the location
#### Find the last location matching a clock time
`GET /api/find-from-localtime`
This API method can help you answer the question "Where was I when my watch read 9:30am on July 15th?".
Timestamps in Exif data do not include the timezone offset, and there is no standard mechanism for including the timezone offset in Exif. Some Canon cameras put the offset in a field, but not all of them do. You can use this method to find your location given an Exif date.
* token - (required) the read token for the database
* input - specify a clock time in the format `YYYY-mm-dd HH:MM:SS`
This will query the database and find the closest matching location for when your clock read that time.