-
Notifications
You must be signed in to change notification settings - Fork 0
Adventures API
This section describes the actions you can take on Adventures with the Sunday Peak API.
Top Level Adventures are any adventures that do not have a parent zone. This API is meant to fetch all the adventures to display on the map when no zone is selected. The response will be a geoJSON object with a list of adventures that fall into this category.
This API doesn't require an auth token because it is meant to be able to be used without loggin in to either the website or the app. All data regarding any users is restricted from this call.
https://api.sundaypeak.com/adventures/all?type=<AdventureType>
Content-Type: application/json
HTTP Method: GETThe <AdventureType> variable is one of enum AdventureType
{
data: {
adventures: {
<AdventureType>: {
lines: GeoJSON-Object
points: GeoJSON-Object
}
}
},
status_code: Int
timestamp: Int
}| Key | Type | Description |
|---|---|---|
lines |
GeoJSON-Object | all the features in the adventures collection who's geo data consists of a path |
points |
GeoJSON-Object | all the features who's geo data are just a coordinate pair |
This API gets adventures ordered by distance from a specified lat and lng. In the root adventure view, the closest adventures to the current center point of the screen will be populated with this call. The response will be a list of abridged adventures that fall into this category.
This API doesn't require an auth token because it is meant to be able to be used without logging in to either the website or the app. All data regarding any users is restricted from this call.
https://api.sundaypeak.com/adventures/distance?adventure_type=<AdventureType>&coordinates_lat=<Lat>&coordinates_lng=<Lng>&count=<Count>
Content-Type: application/json
HTTP Method: GETThe <AdventureType> variable is one of enum AdventureType
The <Lat> variable is a floating point number representing coordinate latitude
The <Lng> variable is a floating point number representing coordinate longitude
The <Count> variable is an Int determining the amount of adventures returned
TODO: Change adventure_type above to just type. adventure_type is redundant
{
data: {
adventures: ShortAdventure[]
},
status_code: Int
timestamp: Int
}| Key | Type | Description |
|---|---|---|
adventures |
ShortAdventure | an abridged version of the adventure object for when many adventures are requested |