Group
Retrieve the list of groups
Retrieves the list of groups (for a season and league/game_class) as an e.g. Dropdown object.
The result format is defined by the provided parameter format
:
- Group list as dropdown:
format
is set to"dropdown"
.
Groups with format "dropdown"
Definition
GET https://api-v2.swissunihockey.ch/api/groups
Takes:
- season
- e.g.
2014
- Season selector.
- league
- e.g.
1
- League selector.
- game_class
- e.g.
11
- Game class selector.
- format
- e.g.
"dropdown"
- Format selector.
These fields are returned:
- text
- string
- The name of the dropdown.
- resource
- string
- The path of the resource.
- entries
- array(object)
- Dropdown selections with set_in_content where group is set, and a textual representation of a saison.
- levels
- array(string)
- There is only one level, "Gruppe".
- highlight
- boolean
- Always false.
Returns a structure of type dropdown
:
{
"type": "dropdown",
"text": "Group",
"resource": "/groups",
"entries": [
{"text"=>"Gruppe 1",
"set_in_context"=>{"group"=>"Gruppe 1"},
"entries"=>[],
"highlight"=>true},
{"text"=>"Gruppe 2",
"set_in_context"=>{"group"=>"Gruppe 5"},
"entries"=>[],
"highlight"=>false},
{"text"=>"Gruppe 3",
"set_in_context"=>{"group"=>"Gruppe 3"},
"entries"=>[],
"highlight"=>false}
],
"levels": ["Gruppe"],
"highlight": false
}