Skip to content

Adventures Objects

Andrew Maclean edited this page Jun 27, 2024 · 20 revisions

Short Adventure

{
  adventure_id: Int
  adventure_name: String
  adventure_type: AdventureType
  difficulty: String
  rating: String
  nearest_city: String
  coordinates: Coordinates
  path: GeoJSONCoordinates[]?
}
Key Type Description
adventure_id Int
adventure_name String
adventure_type AdventureType
difficulty String The adventure difficulty score followed by ':' followed by the number of votes to calculate the average
rating String The adventure rating score followed by ':' followed by the number of votes to calculate the average
nearest_city String City, State
coordinates Coordinates
path GeoJSON Coordinates[] If the current adventure has a map path associated with it, this will be an array of coordinates otherwise an empty array. Note: This property doesn't exist on all shortAdventure types

Generic Adventure Object

{
  id: Int
  adventure_name: String
  adventure_type: AdventureType
  bio: String
  creator: ShortUser
  date_created: Int
  difficulty: String
  rating: String
  nearest_city: String
  coordinates: Coordinates
  path: GeoJSONCoordinates[]?
  points: GeoJSONCoordinates[]?
  elevations: [Double, Double][]?
  season: String
  images: String[]
  breadcrumb: BreadcrumbObject[]
  todo_users: ShortUser[]
  completed_users: ShortUser[]
  public: Boolean
}
Key Type Description
id Int
adventure_name String
adventure_type AdventureType
bio String
creator ShortUser Details about the creator of the adventure
date_created Int A timestamp of when the object was created
difficulty String The adventure difficulty score followed by ':' followed by the number of votes to calculate the average
rating String The adventure rating score followed by ':' followed by the number of votes to calculate the average
nearest_city String City, State
coordinates Coordinates
path GeoJSON Coordinates[] If the current adventure has a map path associated with it, this will be an array of coordinates otherwise an empty array. Note: This property doesn't exist on all shortAdventure types
points GeoJSON Coordinates[] This denotes the series of points to edit the path. It doesn't always equate to path in instances where path is matched to a road or trail. Note: This property doesn't exist on all shortAdventure types
elevations [Double, Double][] The first number in the pair is the elevation of the point, the second number is the distance from the start of the path so the points can be graphed. elevations will only be populated if path is, otherwise it will be an empty set.
public Boolean
season String A stringified array of booleans for each month
images String[] A list of url strings for the image CDN
breadcrumb Breadcrumb Object[]
todo_users ShortUser[] The users that want to complete this adventure
completed_users ShortUser[] The users that have completed this adventure

Ski Adventure Object

{
  ...GenericAdventureObject
  avg_angle: Int
  max_angle: Int
  aspect: String
  summit_elevation: Int
  base_elevation: Int
  exposure: Int
}
Key Type Description
avg_angle Int
max_angle Int
aspect String Cardinal compass directions "XX"
summit_elevation Int In feet
base_elevation Int In feet
exposure Int Scale of 0-5

GeoJSON Object

{
  type: "FeatureCollection",
  features: GeoJSONFeature[]
}
Key Type Description
type "FeatureCollection"
features GeoJSON Feature[]

GeoJSON Feature

{
  type: "Feature",
  geometry: {
    type: "Point" | "LineString"
    coordinates: [lng, lat] | [lng, lat][]
  },
  id: Int
  properties: {
    adventureType: adventureType
    adventureName: String
    color: String
  }
}
Key Type Description
type "Feature"
geometry Object
geometry.type "Point" or "Linestring"
geometry.coordinates [Float, Float] An array of two floats representing, longitude and latitude
id Int The feature id
properties Object
properties.adventureType AdventureType
properties.adventureName String The name of the adventure
properties.color String The line color portrayed on the map

AdventureType

enum('ski' | 'climb' | 'hike' | 'bike' | 'skiApproach')

Coordinates Object

{
  lat: Float,
  lng: Float
}

GeoJSON Coordinates Object

[lng, lat]

Clone this wiki locally