Cycling v1

API API Version
Cycling v1
Note: Authentication is required for all API calls.
## Race Summary ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/cycling-t1/en/races/sr:race:271584/summary.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cycling-t1/en/races/sr:race:271584/summary.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/cycling-t1/en/races/sr:race:271584/summary.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Race Summary. https://api.sportradar.us/cycling-`{access_level}{version}`/`{language_code}`/races/`{race_id}`/summary.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `race_id` | Id of a given race. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Race Summary use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/cycling/race_summary.xsd ## Rider Profile ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/cycling-t1/en/riders/sr:rider:41433/profile.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cycling-t1/en/riders/sr:rider:41433/profile.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/cycling-t1/en/riders/sr:rider:41433/profile.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Rider Profile. https://api.sportradar.us/cycling-`{access_level}{version}`/`{language_code}`/riders/`{rider_id}`/profile.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `rider_id` | Id of a given rider. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Rider Profile use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/cycling/rider_profile.xsd ## Schedule ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/cycling-t1/en/schedules/2017-07-11/schedule.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cycling-t1/en/schedules/2017-07-11/schedule.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/cycling-t1/en/schedules/2017-07-11/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Schedule. https://api.sportradar.us/cycling-`{access_level}{version}`/`{language_code}`/schedules/`{year}`-`{month}`-`{day}`/schedule.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `year` | Year in 4 digit format (YYYY). | | `month` | Month in 2 digit format (MM). | | `day` | Day in 2 digit format (DD). | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Schedule use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/cycling/schedule.xsd ## Stage Summary ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/cycling-t1/en/stages/sr:stage:271592/summary.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cycling-t1/en/stages/sr:stage:271592/summary.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/cycling-t1/en/stages/sr:stage:271592/summary.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Stage Summary. https://api.sportradar.us/cycling-`{access_level}{version}`/`{language_code}`/stages/{stage_id}/summary.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `stage_id` | Id of a given stage. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Stage Summary use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/cycling/stage_summary.xsd ## Team Profile ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/cycling-t1/en/teams/sr:team:33029/profile.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cycling-t1/en/teams/sr:team:33029/profile.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/cycling-t1/en/teams/sr:team:33029/profile.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Team Profile. https://api.sportradar.us/cycling-`{access_level}{version}`/`{language_code}`/teams/`{team_id}`/profile.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `team_id` | Id of a given team. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Team Profiles use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/cycling/team_profile.xsd ## Tournament Info ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/cycling-t1/en/tournaments/sr:race_tournament:270956/info.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cycling-t1/en/tournaments/sr:race_tournament:270956/info.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/cycling-t1/en/tournaments/sr:race_tournament:270956/info.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves Tournament Info. https://api.sportradar.us/cycling-`{access_level}{version}`/`{language_code}`/tournaments/`{tournament_id}`/info.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `tournament_id` | Id of a given tournament. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for Tournament Info use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/cycling/tournament_info.xsd ## Tournament List ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/cycling-t1/en/tournaments.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cycling-t1/en/tournaments.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/cycling-t1/en/tournaments.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Tournament List. https://api.sportradar.us/cycling-`{access_level}{version}`/`{language_code}`/tournaments.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Tournament List use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/cycling/tournaments.xsd ## Tournament Schedule ```ruby require 'uri' require 'net/http' require 'openssl' url = URI("https://api.sportradar.us/cycling-t1/en/tournaments/sr:race_tournament:270956/schedule.xml?api_key={your_api_key}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```python import http.client conn = http.client.HTTPSConnection("api.sportradar.us") conn.request("GET", "/cycling-t1/en/tournaments/sr:race_tournament:270956/schedule.xml?api_key={your_api_key}") res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ```shell curl -X GET "https://api.sportradar.us/cycling-t1/en/tournaments/sr:race_tournament:270956/schedule.xml?api_key={your_api_key}" ``` > The above command returns xml structured like this. This endpoint retrieves the Tournament Schedule. https://api.sportradar.us/cycling-`{access_level}{version}`/`{language_code}`/tournaments/`{tournament_id}`/schedule.`{format}`?api_key=`{your_api_key}` Replace placeholders with the following query parameters: | Parameter | Description | | --------- | ----------- | | `access_level` | Defines the access level of your API key as Production (p) or Trial (t). | | `version` | Version number of the API you are accessing (Current Version: 1). | | `language_code` | Supported Locales | | `tournament_id` | Id of a given tournament. | | `format` | xml or json. | | `your_api_key` | Your API key. | To retrieve the XML Schema Definition (.XSD) for the Tournament Schedule use the following URL. http://schemas.sportradar.com/bsa/v1/endpoints/cycling/tournament_schedule.xsd