Leagues By Class
This endpoint allows you to retrieve the leagues from a specific class.
Multi-language: This feature allows the user to manually change the language of the API response by adding value to the
lang
attribute. Example:lang=en
.
Pagination: The endpoint uses an offset and limit system. Specify the offset and limit parameters to fetch the desired range of results. The maximum and default number of results per request is 50.
Update Period: The endpoint is updated every day.
Recommended Calls: Limit calls to 1 per day.
Use Cases
Get leagues from a specific class_idhttps://basketball.sportdevs.com/leagues-by-category?class_id=eq.{class_id}
Query Parameters
- class_id integer
Default value:
eq.27
The id of the class
- offset string
Default value:
0
Limiting and Pagination
- limit string
Default value:
50
Limiting and Pagination
- lang string
Default value:
en
Multi-language
- 200
OK
- application/json
- Schema
- Example (from schema)
Schema array
- class_id integer
The id of the class
Note: This is a Foreign Key to
classes.id
. - class_name text
The name of the class
- class_hash_image character varying
Possible values:
<= 64 characters
The hash image of the class
- leagues jsonb
The leagues
[
{
"class_id": 27,
"class_name": "Poland",
"class_hash_image": "ba37a411a35002d607b0923904153b2235934b3a3fea2c524b0fa0014b7ab83d",
"leagues": [
{
"id": 1903,
"name": "PLK",
"hash_image": "52eed2feff2ded8c1a5a05514ace276bfff9f4c1359fd84a8ee5dfb53247ec8d"
},
{
"id": 1916,
"name": "Superpuchar",
"hash_image": "8f5c0f3b254431fe01fca3cd43eb861e65f6c77a18d3e5e78cd8d6c3d45954ad"
},
{
"id": 1921,
"name": "Polish Basketball Cup",
"hash_image": "cf9eb180c47a11734b6c28a7fb308ad9f411e40994353a75090f4b879e49b547"
},
{
"id": 1997,
"name": "PLKK",
"hash_image": "f2e13993dd67102baba8accb518319efcd1ed0f2bbf32006df06335f7cb5c58f"
},
{
"id": 2031,
"name": "1 Liga",
"hash_image": "0dd2506c42cb15b6d942296e3a561de488e55ade8a9724a1435270860d9a6231"
},
{
"id": 2091,
"name": "2 Liga",
"hash_image": "7536233d24c7db6c55088df843d5cdf45540daa172669e798b64332d09e542c6"
}
]
}
]