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://football.sportdevs.com/leagues-by-category?class_id=eq.{class_id}
Query Parameters
- class_id integer
Default value:
eq.121
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": 121,
"class_name": "Northern Ireland",
"class_hash_image": "daff95ecaa03094798f4021b9ea82e3d13e2f9a172cc75e1babf42477407add2",
"leagues": [
{
"id": 5,
"name": "Premiership",
"hash_image": "c7fd1a8748b87adf5a0d018f87ab8cbdf9e7cba0e2fcc6bae52087c8a1bfdc13"
},
{
"id": 25,
"name": "League Cup",
"hash_image": "3ae1cd2b303b319b3a9c0e798a1751a6f1a9ce0eb4299db2eb0052416e2f6510"
},
{
"id": 38,
"name": "Irish Cup",
"hash_image": "cc45cc95d7226db716f22e5985183864e2b59de9b05684ba6f40ebf7a31b95b2"
},
{
"id": 555,
"name": "NIFL Charity Shield",
"hash_image": "acedc9090257c54ac21fd47968b3fb92933721dcae33171c715d0020b16c89b8"
},
{
"id": 565,
"name": "Championship",
"hash_image": "5931196b0a7b53ac584738571371d3f33705ca5fc7f15b63ba3222d91ad4f2f6"
}
]
}
]