Sports
Sports with organizations
Please use this method in place of the older sports genres which has been depecrated.
Returns a listing of all or specified sports codes and descriptions. Optionally return associated organization information for the specified sports. This API is used as a reference to obtain sportsId and organizationId for use in other sports APIs. Response data will be sorted alphabetically by sport name.
Request Parameters
| Parameter | Mandatory? | Description |
|---|---|---|
| sportsId | Yes | Specify 'all' for listing of all available sports. Specify comma-delimited list of sportsIds for lookup of sport information (e.g., ‘59,111’ for basketball and football) |
| includeOrg | No | Boolean indicating whether to include sport organization details. Valid values are true, false. Defaults to false. |
| officialOrg | No | If set to true, only official sport organization details are returned. Valid values are true, false. Defaults to false. |
| imageSize | No | Requested size of image returned in preferredImage URI. Valid values are: Sm, Md, Lg, Ms. If not specified, defaults to Md. If requested image size is not available, generic image will be returned. |
| api_key | Yes | 24-character key obtained during application registration |
Response Body
| Response | Description |
|---|---|
| sportsId | Resource identifier for sport |
| sportsName | name of sport |
| organizations | List of organizations/leagues associated with sport. Note that not all sports have related organizations. |
| organizationId | Resource identifier for organization |
| organizationName | name of organization related to sport (e.g., NFL Football, MLB Baseball) |
| preferredImage | organization logo, if available |
Sample Request
http://data.tmsapi.com/v1.1/sports/all?includeOrg=true&api_key=1234567890
Sample Response
Code
Last modified on