Sports with organizations
/sports/:sportsId
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. See Image Sizing for details. 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. See Organization Metadata for listing of currently categorized organizations by sport. |
organizationId | Resource identifier for organization |
organizationName | name of organization related to sport (e.g., NFL Football, MLB Baseball) |
preferredImage | organization logo, if available; see Image Metadata for details |
Sample Request
http://data.tmsapi.com/v1.1/sports/all?includeOrg=true&api_key=1234567890
Sample Response
[
{ "sportsId": "47", "sportsName": "Archery"},
{ "sportsId": "56", "sportsName": "Badminton"},
{ "sportsId": "59", "sportsName": "Basketball",
"organizations": [
{
"organizationId": "19",
"organizationName": "NBA Basketball",
"preferredImage": {
"uri": "sportslogos/h3/AllPhotos/19/o19_l_h3_aa.png",
"height": "270",
"width": "360",
"primary": "true",
"category": "Logo"
},
"officialOrg" : true
}, ...additional organizations... ]
{ "sportsId": "62", "sportsName": "Biathlon"},
{ "sportsId": "69", "sportsName": "Bobsled"},
{ "sportsId": "71", "sportsName": "Bowling" },
...additional sports...
]