Skip to content

Adventures API

Andrew Maclean edited this page Jun 24, 2024 · 15 revisions

This section describes the actions you can take on Adventures with the Sunday Peak API.

Get Top Level Adventures

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.

Adventures Endpoint

https://api.sundaypeak.com/adventures/all?type=<AdventureType>

Content-Type: application/json
HTTP Method: GET

The <AdventureType> variable is one of enum AdventureType

Response:

{
  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

Clone this wiki locally