Season
Retrieve the list of seasons
Retrieves the list of seasons as an e.g. Dropdown object.
The result format is defined by the provided parameter format
:
- Season list as dropdown:
format
is set to"dropdown"
.
Seasons with format "dropdown"
Definition
GET https://api-v2.swissunihockey.ch/api/seasons
Takes:
- format
- e.g.
"dropdown"
- Format selector.
These fields are returned:
- text
- string
- The name of the dropdown.
- resource
- array(object)
- A list of header columns. Contains the text to display,
- how it is aligned, and how wide it is.
- entries
- array(object)
- Dropdown selections with set_in_content where saison_id is set, and a textual representation of a saison.
- levels
- array(string)
- There is only one level, "Saison".
- highlight
- boolean
- Always false.
Returns a structure of type dropdown
:
{
"type": "dropdown",
"text": "Saison",
"resource": "/seasons",
"entries": [
{"text": "2015/16", "set_in_context": {"saison_id": 2015}, "entries": [], "highlight": true},
{"text": "2014/15", "set_in_context": {"saison_id": 2014}, "entries": [], "highlight": false},
{"text": "2013/14", "set_in_context": {"saison_id": 2013}, "entries": [], "highlight": false}
],
"levels": ["Saison"],
"highlight": false
}