Snowparks
A resource that implements the concept of Snowpark defined in the AlpineBits® DestinationData Ontology.
A JSON object representing such a resource MUST contain the following fields:
-
type: the constant"snowparks"that identifies the resource as being of the type snowpark. -
id: a string that uniquely and persistently identifies the snowpark within a SERVER. See the definition in basic-resource-schema.adoc#anchor-attributes. -
attributes: an object containing the attributes of the snowpark. -
relationships: an object containing the relationships of the snowpark to other resources. -
links: an object containing the links related to the snowpark.
A snowpark resource is structured as follows:
{
"type": "snowparks",
"id": "1",
"meta": { ... },
"attributes": { ... },
"relationships": { ... },
"links": { ... }
}
1. Meta
See definition of the meta object in basic-resource-schema.adoc#anchor-metadata.
2. Attributes
The attributes object of a snowpark resource MUST contain the following fields:
-
abstract: a datatypes.adoc#anchor-text object containing a brief description for the snowpark. Nullable. See definition in basic-resource-schema.adoc#anchor-attributes. -
address: an datatypes.adoc#anchor-address object representing the address of the snowpark. The address should only be set if the trail is directly accessible from a public road. Nullable. -
categories: an array of datatypes.adoc#anchor-type strings identifying the types instantiated by the snowpark. Nullable. -
description: a datatypes.adoc#anchor-text object containing a description of the snowpark. Nullable. Conditional Assignment. See definition in basic-resource-schema.adoc#anchor-attributes. -
difficulty: a string describing the difficulty level of a snowpark according to the following enumerated values:-
"beginner" -
"intermediate" -
"advanced" -
"expert"
-
-
features: an array of datatypes.adoc#anchor-type strings that informs the types of features available within the snowpark, such as a jump or a rail. -
geometries: an array of datatypes.adoc#anchor-geometry objects each of which represents the location of the snowpark in terms of GPS coordinates. There should be at most one geometry object of each type (e.g. Point, LineString). Nullable. -
howToArrive: a datatypes.adoc#anchor-text object containing instructions on how to arrive at the snowpark. Nullable. -
length: a number representing the total length of the snowpark in meters. The computation of the length (in the case of branching paths, for instance) is determined by the data provider. Nullable. -
maxAltitude: a number representing the highest elevation point of the snowpark in meters above sea level. Nullable. -
minAltitude: a number representing the lowest elevation point of the snowpark in meters above sea level. Nullable. -
name: a datatypes.adoc#anchor-text object containing the complete name of the snowpark. Non-nullable. Conditional Assignment. See definition in basic-resource-schema.adoc#anchor-attributes. -
openingHours: an array of datatypes.adoc#anchor-hoursspecification representing the hours in which the snowpark is open to the public. Nullable. -
shortName: a datatypes.adoc#anchor-text object containing a short name of the snowpark. Nullable. See definition in basic-resource-schema.adoc#anchor-attributes. -
snowCondition: a datatypes.adoc#anchor-snow object containing the latest reported condition of the snow in the snowpark. -
url: a datatypes.adoc#anchor-url describing the snowpark, such as a website or a Wikipedia page. Nullable.
A summary of the attributes is presented in the table below:
| Field | Type | Constraints |
|---|---|---|
abstract |
Nullable |
|
address |
Nullable |
|
categories |
Array of datatypes.adoc#anchor-type |
Nullable, Non-empty |
description |
Nullable, Conditional Assignment |
|
difficulty |
string |
Enumeration, Nullable |
features |
Array of datatypes.adoc#anchor-type |
Nullable, Non-empty |
geometries |
Array of datatypes.adoc#anchor-geometry |
Nullable, Non-empty |
howToArrive |
string |
Nullable |
length |
number |
Nullable, Unit of Measure, Greater than Zero |
maxAltitude |
number |
Nullable, Unit of Measure |
minAltitude |
number |
Nullable, Unit of Measure |
name |
Non-nullable, Conditional Assignment |
|
openingHours |
Nullable, Non-empty |
|
shortName |
Nullable |
|
snowCondition |
Nullable |
|
url |
Nullable |
3. Relationships
The relationships object of a snowpark resource MUST contain the following fields:
-
connections: an basic-resource-schema.adoc#anchor-referencetomany place resources that identify the places that are physically accessible from the mountain area, which may include other Snowparks, Lifts, Mountain Areas, and Trails. Nullable. Non-empty. -
multimediaDescriptions: an basic-resource-schema.adoc#anchor-referencetomany media object resources (see Media Objects) that illustrate the snowpark. See Section basic-resource-schema.adoc#anchor-multimediadescriptions. Nullable. Non-empty.
A summary of the relationships is presented in the table below:
| Field | Type | Constraints |
|---|---|---|
connections |
basic-resource-schema.adoc#anchor-referencetomany object to Mountain Areas, Trails, Lifts and Snowparks |
Nullable, Non-empty |
multimediaDescriptions |
basic-resource-schema.adoc#anchor-referencetomany object to Media Objects |
Nullable, Non-empty |
4. Links
See definition of the links object in basic-resource-schema.adoc#anchor-links.
5. Endpoints
The following endpoints in this API specification return snowpark resources:
-
https://example.com /1.0/snowparks: returns a collection of snowparks. -
https://example.com /1.0/snowparks/:id: returns the snowpark identified by the:idparameter. -
https://example.com /1.0/snowparks/:id/connections: returns a collection of resources which may include snowparks. -
https://example.com /1.0/lifts/:id/connections: returns a collection of resources which may include snowparks. -
https://example.com /1.0/mountainAreas/:id/snowparks: returns a collection of snowparks. -
https://example.com /1.0/mountainAreas/:id/connections: returns a collection of resources which may include snowparks. -
https://example.com /1.0/trails/:id/connections: returns a collection of resources which may include snowparks.
6. Examples
The following example contains the minimal information required for a snowpark resource:
{
"type": "snowparks",
"id": "1",
"meta": {
"dataProvider": null,
"lastUpdate": null
},
"attributes": {
"name": {
"eng": "Snowpark Merano 2000"
},
"shortName": null,
"description": null,
"abstract": null,
"url": null,
"categories": null,
"length": null,
"minAltitude": null,
"maxAltitude": null,
"address": {
"street": null,
"city": {
"eng": "Merano"
},
"region": null,
"country": "IT",
"zipcode": null,
"categories": null,
"complement": null
},
"howToArrive": null,
"difficulty": null,
"features": null,
"geometries": null,
"openingHours": null,
"snowCondition": null
},
"relationships": {
"connections": null,
"multimediaDescriptions": null
},
"links": {
"self": "http://example.com/1.0/snowparks/1"
}
}
|
The following example illustrates the fields defined for snowpark resources:
{
"type": "snowparks",
"id": "1",
"meta": {
"dataProvider": "http://example.com",
"lastUpdate": "2020-04-01T08:00:00+02:00"
},
"attributes": {
"name": {
"ita": "Snowpark Merano 2000",
"deu": "Snowpark Merano 2000",
"eng": "Snowpark Merano 2000"
},
"shortName": {
"eng": "Snowpark Merano 2000"
},
"description": {
"eng": "Located in the rear part of the skiing area on the Oswald-Slope, close to the Waidmann Alpine Cottage, the SNOWPARK MERANO 2000 awaits brave Snowboarders and Freestylers. An ambitious project with many kicks, rails, tubes and boxes for newcomers and pros alike. You can reach the Jump Zone from the mountain station of the Ropeway by using the chairlift Piffing."
},
"abstract": {
"eng": "Located in the rear part of the skiing area on the Oswald-Slope, close to the Waidmann Alpine Cottage, the SNOWPARK MERANO 2000 awaits brave Snowboarders and Freestylers..."
},
"url": "http://example.com",
"categories": [
"example/free-style"
],
"length": 1300,
"minAltitude": 1500,
"maxAltitude": 2500,
"address": {
"street": null,
"city": {
"eng": "Merano"
},
"region": null,
"country": "IT",
"zipcode": null,
"categories": null,
"complement": null
},
"howToArrive": null,
"difficulty": "intermediate",
"features": [
"example/jib",
"example/pipe"
],
"geometries": [
{
"type": "LineString",
"coordinates": [
[
11.305682659149168,
46.66705018437341
],
[
11.30692720413208,
46.667182709603225
],
[
11.308064460754393,
46.667491933875965
]
]
}
],
"openingHours": {
"dailySchedules": {
"2020-12-25": null
},
"weeklySchedules": [
{
"validFrom": "2020-01-01",
"validTo": "2020-12-31",
"monday": [
{
"opens": "08:00:00+01:00",
"closes": "18:00:00+01:00"
}
],
"tuesday": [
{
"opens": "08:00:00+01:00",
"closes": "18:00:00+01:00"
}
],
"wednesday": [
{
"opens": "08:00:00+01:00",
"closes": "18:00:00+01:00"
}
],
"thursday": [
{
"opens": "08:00:00+01:00",
"closes": "18:00:00+01:00"
}
],
"friday": [
{
"opens": "08:00:00+01:00",
"closes": "18:00:00+01:00"
}
],
"saturday": [
{
"opens": "08:00:00+01:00",
"closes": "18:00:00+01:00"
}
],
"sunday": [
{
"opens": "08:00:00+01:00",
"closes": "18:00:00+01:00"
}
]
}
]
},
"snowCondition": {
"primarySurface": "mtnxml/frozen-granular",
"secondarySurface": "mtnxml/packed-powder",
"baseSnow": 30,
"baseSnowRange": {
"lower": 25,
"upper": 40
},
"latestStorm": 5,
"obtainedIn": "2020-01-14",
"snowOverNight": 0,
"groomed": true,
"snowMaking": false
}
},
"relationships": {
"connections": {
"data": [
{
"type": "trails",
"id": "2"
},
{
"type": "trails",
"id": "3"
}
],
"links": {
"related": "http://example.com/1.0/mountainAreas/1/connections/"
}
},
"multimediaDescriptions": {
"data": [
{
"type": "mediaObjects",
"id": "2"
}
],
"links": {
"related": "http://example.com/1.0/mountainAreas/1/multimediaDescriptions/"
}
}
},
"links": {
"self": "http://example.com/1.0/snowparks/1"
}
}
|