WNBA Push Clock retrieves a game clock feed with high level scoring and possession information.
Syntax
https://api.sportradar.us/wnba/{access_level}/stream/clock/subscribe?api_key={your_api_key} |
Parameters
Parameter | Description |
---|---|
access_level | Defines the access level of your API keyproduction , trial |
your_api_key | Your API key |
Optional Query String Parameters
By default, a Push feed will provide all data available for all in progress games. If needed, you can filter the data returned by including query strings.
Optional query string parameters must be added after your API key with an ampersand (&
). If you are filtering for more than one result, separate the results with a comma (,
) and no spaces.
Parameter | Description |
---|---|
locale | Language returned expressed as a 2-letter codeen (English)Example: locale=en |
match | Match id Example: match=sd:match:b9cf745b-36a1-404e-8159-78d719742a6b |
operation | Operation typeupdate , delete , or insert Example: operation=update |
status | Game statusinprogress , created Example: status=inprogress |
Code Samples
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.sportradar.us/wnba/trial/stream/clock/subscribe?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
import requests
import json
r = requests.get("https://api.sportradar.com/wnba/trial/stream/clock/subscribe",
params = {'api_key': 'your_api_key'},
allow_redirects=False)
redirect_url = r.headers['Location']
r = requests.get(redirect_url, stream=True)
for line in r.iter_lines():
# filter out keep-alive new lines
if line:
decoded_line = line.decode('utf-8')
print(json.loads(decoded_line))
curl -L GET 'api.sportradar.us/wnba/trial/stream/clock/subscribe?api_key={your_api_key}'
Samples with Query String Params
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.sportradar.us/wnba/trial/stream/clock/subscribe?api_key={your_api_key}&status=inprogress&match=sd:match:b9cf745b-36a1-404e-8159-78d719742a6b")
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
import requests
import json
r = requests.get("https://api.sportradar.com/wnba/trial/stream/clock/subscribe",
params = {'api_key': 'your_api_key', 'status': 'inprogress', 'match': 'sd:match:b9cf745b-36a1-404e-8159-78d719742a6b'},
allow_redirects=False)
redirect_url = r.headers['Location']
r = requests.get(redirect_url, stream=True)
for line in r.iter_lines():
# filter out keep-alive new lines
if line:
decoded_line = line.decode('utf-8')
print(json.loads(decoded_line))
curl -L GET 'api.sportradar.us/wnba/trial/stream/clock/subscribe?api_key={your_api_key}&status=inprogress&match=sd:match:b9cf745b-36a1-404e-8159-78d719742a6b'
Response Samples
The above commands return json like this.
Data Points
Game:
Attribute | Parent Element | Type | Description |
---|---|---|---|
coverage | game | String | Coverage level of a gamefull , extended_boxscore |
id | game | GUID | Unique ID of a game ex. a015b02d-845c-40c1-8ef4-844984f47e4d |
reference | game | String | League reference ID of a game ex. 1611661323 |
sr_id | game | GUID | Unique Sportradar ID of a game ex. sr:match:17582493 |
status | game | String | The status of a gamescheduled , created , inprogress , halftime , complete , closed , cancelled , delayed , postponed , time-tbd , if-necessary , unnecessary Please see our FAQ section for a list of game status definitions |
title | game | String | Title of a game ex. Game 3 |
scheduled | game | dateTime | Scheduled date and time of a game ex. 2024-02-14T05:00:00Z |
Metadata:
Attribute | Parent Element | Type | Description |
---|---|---|---|
league | metadata | String | Alias of a league ex. WNBA |
locale | metadata | String | Language code ex. en (English) |
match | metadata | GUID | Unique ID of a game ex. sd:match:b38e436c-985b-4f59-8a25-68b73b4a98a1,sr:match:17582493 |
operation | metadata | String | Operation of an updateupdate , delete |
status | metadata | String | The status of a gamescheduled , created , inprogress , halftime , complete , closed , cancelled , delayed , postponed , time-tbd , if-necessary , unnecessary Please see our FAQ section for a list of game status definitions |
version | metadata | String | Version of the API ex. v7 |
Play-by-Play:
Attribute | Parent Element | Type | Description |
---|---|---|---|
bonus | game - away | Boolean | Signifies a team is in the bonus |
points | game - away | Integer | Total points for the away team |
id | game - away | GUID | Unique ID of the away team ex. a015b02d-845c-40c1-8ef4-844984f47e4d |
market | game - away | String | Market name of the away team ex. Connecticut |
name | game - away | String | Away team name ex. Sun |
reference | game - away | String | League reference ID of the away team ex. 1611661323 |
remaining_timeouts | game - away | Integer | Remaining timeouts for the away team |
sr_id | game - away | GUID | Unique Sportradar ID of the away team ex. sr:team:35547 |
bonus | game - home | Boolean | Signifies a team is in the bonus |
points | game - home | Integer | Total points for the home team |
id | game - home | GUID | Unique ID of the home team ex. 0699edf3-5993-4182-b9b4-ec935cbd4fcc |
market | game - home | String | Market name of the home team ex. Connecticut |
name | game - home | String | Home team name ex. Sun |
reference | game - home | String | League reference ID of the home team ex. 1611661317 |
remaining_timeouts | game - home | Integer | Remaining timeouts for the home team |
sr_id | game - home | GUID | Unique Sportradar ID of the home team ex. sr:team:35547 |
Clock:
Attribute | Parent Element | Type | Description |
---|---|---|---|
game_decimal | clocks | String | Clock value in decimal form when the game clock is under 1:00. Otherwise it displays the same value as clock ex. 00:21.70 |
game | clocks | String | Game clock value for an event ex. 1157 |
running | clocks | Boolean | Signifies the game clock was running when a message was sent |
shot | clocks | String | Shot clock value for an event ex. 11.00 |
Quarter:
Attribute | Parent Element | Type | Description |
---|---|---|---|
number | period | Integer | Number of a quarter |
sequence | period | Integer | Sequential number of a quarter |
type | period | GUID | Type of periodREG , OT |