diff --git a/.github/workflows/pylint.yaml b/.github/workflows/pylint.yaml index 64f3ce2..dc55790 100644 --- a/.github/workflows/pylint.yaml +++ b/.github/workflows/pylint.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9"] + python-version: ["3.10"] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index d933723..4e0c885 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.9', '3.10'] + python-version: ['3.9', '3.10', '3.11'] steps: - uses: actions/checkout@v3 diff --git a/custom_components/teamtracker/__init__.py b/custom_components/teamtracker/__init__.py index e990d9e..545af96 100644 --- a/custom_components/teamtracker/__init__.py +++ b/custom_components/teamtracker/__init__.py @@ -248,9 +248,11 @@ async def async_update_game_data(self, config, hass) -> dict: "last_update" ] = DEFAULT_LAST_UPDATE # set to fixed time for compares values["kickoff_in"] = DEFAULT_KICKOFF_IN - with open(path, "w", encoding="utf-8") as convert_file: - convert_file.write(json.dumps(values, indent=4)) - + try: + with open(path, "w", encoding="utf-8") as convert_file: + convert_file.write(json.dumps(values, indent=4)) + except: + _LOGGER.debug("%s: Error creating results file '%s'", sensor_name, path) return values # @@ -293,17 +295,23 @@ async def async_call_api(self, config, hass, lang) -> dict: if file_override: _LOGGER.debug("%s: Overriding API for '%s'", sensor_name, team_id) - async with aiofiles.open("/share/tt/test.json", mode="r") as f: + file_path = "/share/tt/test.json" + if not os.path.exists(file_path): + file_path = "tests/tt/all.json" + async with aiofiles.open(file_path, mode="r") as f: contents = await f.read() data = json.loads(contents) else: async with aiohttp.ClientSession() as session: - async with session.get(url, headers=headers) as r: - _LOGGER.debug( - "%s: Getting state for '%s' from %s", sensor_name, team_id, url - ) - if r.status == 200: - data = await r.json() + try: + async with session.get(url, headers=headers) as r: + _LOGGER.debug( + "%s: Getting state for '%s' from %s", sensor_name, team_id, url + ) + if r.status == 200: + data = await r.json() + except: + data = None num_events = 0 if data is not None: @@ -342,15 +350,18 @@ async def async_call_api(self, config, hass, lang) -> dict: url = URL_HEAD + sport_path + "/" + league_path + URL_TAIL + url_parms async with aiohttp.ClientSession() as session: - async with session.get(url, headers=headers) as r: - _LOGGER.debug( - "%s: Getting state without date constraint for '%s' from %s", - sensor_name, - team_id, - url, - ) - if r.status == 200: - data = await r.json() + try: + async with session.get(url, headers=headers) as r: + _LOGGER.debug( + "%s: Getting state without date constraint for '%s' from %s", + sensor_name, + team_id, + url, + ) + if r.status == 200: + data = await r.json() + except: + data = None num_events = 0 if data is not None: @@ -391,18 +402,21 @@ async def async_call_api(self, config, hass, lang) -> dict: url = URL_HEAD + sport_path + "/" + league_path + URL_TAIL + url_parms async with aiohttp.ClientSession() as session: - async with session.get(url, headers=headers) as r: - _LOGGER.debug( - "%s: Getting state without language for '%s' from %s", - sensor_name, - team_id, - url, - ) - if r.status == 200: - data = await r.json() - + try: + async with session.get(url, headers=headers) as r: + _LOGGER.debug( + "%s: Getting state without language for '%s' from %s", + sensor_name, + team_id, + url, + ) + if r.status == 200: + data = await r.json() + except: + data = None return data, file_override + async def async_update_values(self, config, hass, data, lang) -> dict: """Return values based on the data passed into method""" diff --git a/custom_components/teamtracker/const.py b/custom_components/teamtracker/const.py index 79710a3..a9e8b1a 100644 --- a/custom_components/teamtracker/const.py +++ b/custom_components/teamtracker/const.py @@ -77,7 +77,7 @@ # Misc TEAM_ID = "" -VERSION = "v0.7.3" +VERSION = "v0.7.4" ISSUE_URL = "https://github.com/vasqued2/ha-teamtracker" DOMAIN = "teamtracker" PLATFORM = "sensor" diff --git a/custom_components/teamtracker/event.py b/custom_components/teamtracker/event.py index be26aa2..705de79 100644 --- a/custom_components/teamtracker/event.py +++ b/custom_components/teamtracker/event.py @@ -175,7 +175,7 @@ async def async_find_search_key( ): """Check if there is a match on wildcard, team_abbreviation, event_name, or athlete_name""" - if search_key == "*" and (competitor["type"] == "athlete" or sport_path != "tennis"): + if search_key == "*" and (competitor["type"] == "athlete" or sport_path not in ["tennis", "golf"]): _LOGGER.debug( "%s: Found competitor using wildcard '%s'; parsing data.", sensor_name, diff --git a/pyproject.toml b/pyproject.toml index 8a54b42..71c9846 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ forced_separate = [ combine_as_imports = true [tool.pylint.MAIN] -py-version = "3.9" +py-version = "3.10" ignore = [ "tests", ] diff --git a/tests/const.py b/tests/const.py index ce4e8ba..1b31e4d 100644 --- a/tests/const.py +++ b/tests/const.py @@ -8,6 +8,14 @@ "conference_id": "9999", } +CONFIG_DATA2 = { + "league_id": "NCAAF", + "team_id": "OSU", + "name": "test_tt_all_test02", + "timeout": 120, + "conference_id": "5", +} + TEST_DATA = [ { "sensor_name": "test_tt_all_test01", @@ -177,6 +185,24 @@ "league": "XXX", "team_abbr": "IND", }, + { + "sensor_name": "test_tt_all_test29", + "sport": "racing", + "league": "F1", + "team_abbr": "SAINTZ", + }, + { + "sensor_name": "test_tt_all_test30", + "sport": "racing", + "league": "F1", + "team_abbr": "VERSTAPPEN", + }, + { + "sensor_name": "test_tt_all_test31", + "sport": "racing", + "league": "F1", + "team_abbr": "STROLLZ", + }, ] MULTIGAME_DATA = [ diff --git a/tests/test_init.py b/tests/test_init.py index b98afe1..ab7018d 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -1,17 +1,14 @@ -"""Tests for init.""" -import pytest +""" Tests for TeamTracker """ +import pytest from pytest_homeassistant_custom_component.common import MockConfigEntry - from custom_components.teamtracker.const import DOMAIN from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN +from tests.const import CONFIG_DATA, CONFIG_DATA2 -from tests.const import CONFIG_DATA - - -@pytest.fixture(autouse=True) +@pytest.fixture(autouse=False) def expected_lingering_timers() -> bool: - """Temporary ability to bypass test failures due to lingering timers. + """ Temporary ability to bypass test failures due to lingering timers. Parametrize to True to bypass the pytest failure. @pytest.mark.parametrize("expected_lingering_timers", [True]) This should be removed when all lingering timers have been cleaned up. @@ -19,11 +16,12 @@ def expected_lingering_timers() -> bool: return False -@pytest.mark.parametrize("expected_lingering_timers", [True]) +#@pytest.mark.parametrize("expected_lingering_timers", [True]) async def test_setup_entry( hass, ): - """Test settting up entities.""" + """ test setup """ + entry = MockConfigEntry( domain=DOMAIN, title="team_tracker", @@ -38,14 +36,18 @@ async def test_setup_entry( entries = hass.config_entries.async_entries(DOMAIN) assert len(entries) == 1 + assert await entry.async_unload(hass) + await hass.async_block_till_done() -@pytest.mark.parametrize("expected_lingering_timers", [True]) + +#@pytest.mark.parametrize("expected_lingering_timers", [True]) async def test_unload_entry(hass): - """Test unloading entities.""" + """ test unload """ + entry = MockConfigEntry( domain=DOMAIN, title="team_tracker", - data=CONFIG_DATA, + data=CONFIG_DATA2, ) entry.add_to_hass(hass) @@ -65,26 +67,5 @@ async def test_unload_entry(hass): await hass.async_block_till_done() assert len(hass.states.async_entity_ids(SENSOR_DOMAIN)) == 0 - -# async def test_import(hass): -# """Test importing a config.""" -# entry = MockConfigEntry( -# domain=DOMAIN, -# title="NFL", -# data=CONFIG_DATA, -# ) -# await async_setup_component(hass, "persistent_notification", {}) -# with patch( -# "custom_components.teamtracker.async_setup_entry", -# return_value=True, -# ) as mock_setup_entry: - -# ent_reg = async_get(hass) -# ent_entry = ent_reg.async_get_or_create( -# "sensor", DOMAIN, unique_id="replaceable_unique_id", config_entry=entry -# ) -# entity_id = ent_entry.entity_id -# entry.add_to_hass(hass) -# await hass.config_entries.async_setup(entry.entry_id) -# assert entry.unique_id is None -# assert ent_reg.async_get(entity_id).unique_id == entry.entry_id + assert await entry.async_unload(hass) + await hass.async_block_till_done() diff --git a/tests/test_sensor.py b/tests/test_sensor.py index 4f0506a..82fe6f4 100644 --- a/tests/test_sensor.py +++ b/tests/test_sensor.py @@ -1,27 +1,25 @@ -"""Test NFL Sensor""" +""" Test TeamTracker Sensor """ import pytest - from pytest_homeassistant_custom_component.common import MockConfigEntry - from custom_components.teamtracker.const import DOMAIN - +#from custom_components.teamtracker.sensor import TeamTrackerScoresSensor from tests.const import CONFIG_DATA -@pytest.fixture(autouse=True) +@pytest.fixture(autouse=False) def expected_lingering_timers() -> bool: - """Temporary ability to bypass test failures due to lingering timers. - Parametrize to True to bypass the pytest failure. - @pytest.mark.parametrize("expected_lingering_timers", [True]) - This should be removed when all lingering timers have been cleaned up. + """" Temporary ability to bypass test failures due to lingering timers. + Parametrize to True to bypass the pytest failure. + @pytest.mark.parametrize("expected_lingering_timers", [True]) + This should be removed when all lingering timers have been cleaned up. """ return False - -@pytest.mark.parametrize("expected_lingering_timers", [True]) + +#@pytest.mark.parametrize("expected_lingering_timers", [True]) async def test_sensor(hass, mocker): - """ Make sure sensor gets added """ + """ test sensor """ entry = MockConfigEntry( domain=DOMAIN, @@ -31,11 +29,12 @@ async def test_sensor(hass, mocker): mocker.patch("locale.getlocale", return_value=("en", 0)) - # contents = "{}" - # mocker.patch('aiofiles.open', return_value=mocker.mock_open(read_data=contents).return_value) - entry.add_to_hass(hass) assert await hass.config_entries.async_setup(entry.entry_id) await hass.async_block_till_done() assert "teamtracker" in hass.config.components + + assert await entry.async_unload(hass) + await hass.async_block_till_done() + diff --git a/tests/tt/README.txt b/tests/tt/README.txt index df98bae..7df8a55 100644 --- a/tests/tt/README.txt +++ b/tests/tt/README.txt @@ -1,5 +1,32 @@ How to regression test. +Use test_event.py to validate that sensor is returning the expected results across all supported sports and game situations. + +The all.json file contains the json response for the simulated API call for the TEST_DATA sensors defined in const.py. +The expected result for each sensor defined in TEST_DATA is in the results directory. +The test_event.py file will test each sensor in the TEST_DATA and confirm it matches the expected result in the directory. +The test will fail if there are differences. +If the expected results are supposed to be different, the expected results file should be updated so the test will pass. +The expected results files can be updated manually. +The expected results files can also be regenerated in the /share/tt/results directory + Add the yaml to your config to create the sensor. + Copy the all.json file to /share/tt/test.yaml + Create an empty /share/tt/results directory + Restart HA + The integrationw will create a new version of the expected results file. Compare to prior version to ensure no unexpected changes were introduce. + Update the expected results in the test/results directory. + +Use test_multigame.py to validate the sensor pulls the correct competition to test situations like doubleheaders in baseball. + +The multigame.json file contains the json response for the simulated API call for the MULTIGAME_DATA sensors defined in const.py. +The test_multigame.py file will test each sensor in MULTIGAME_DATA and confirm it matches expected results. +The test will fail if the sensor returns the wrong competition. +The test only validates if the right competition is returned. It does not do the deep compare of each value as the prior test does. + +Legacy tests + +The additional files are legacy manual tests that can be run for even deeper tests of specific sports if desired. + The .json files contain the json for the simulated API call. The .yaml files contain the yaml to create the sensors for the corresponding .json file The -dump.txt files contain the expected output from the sensor dump. diff --git a/tests/tt/all.json b/tests/tt/all.json index 0a80a3c..2c6b103 100644 --- a/tests/tt/all.json +++ b/tests/tt/all.json @@ -57499,6 +57499,2321 @@ "state": "post" } } + }, + { + "id": "600026751", + "uid": "s:2000~l:2030~e:600026751", + "date": "2023-04-28T09:30Z", + "endDate": "2023-04-30T11:00Z", + "name": "Azerbaijan Grand Prix", + "shortName": "Azerbaijan GP", + "season": { + "year": 2023, + "type": 2, + "slug": "regular-season" + }, + "competitions": [ + { + "id": "401511283", + "uid": "s:2000~l:2030~e:600026751~c:401511283", + "date": "2023-04-28T09:30Z", + "type": { + "id": "1", + "abbreviation": "FP1" + }, + "timeValid": true, + "recent": false, + "competitors": [ + { + "id": "4665", + "uid": "s:2000~a:4665", + "type": "athlete", + "order": 1, + "winner": false, + "athlete": { + "fullName": "Max Verstappen", + "displayName": "Max Verstappen", + "shortName": "M. Verstappen", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/ned.png", + "alt": "Netherlands", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5498", + "uid": "s:2000~a:5498", + "type": "athlete", + "order": 2, + "winner": false, + "athlete": { + "fullName": "Cherles Leclerc", + "displayName": "Cherles Leclerc", + "shortName": "C. Leclerc", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/mon.png", + "alt": "Monaco", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4472", + "uid": "s:2000~a:4472", + "type": "athlete", + "order": 3, + "winner": false, + "athlete": { + "fullName": "Sergio Pérez", + "displayName": "Sergio Pérez", + "shortName": "S. Pérez", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/mex.png", + "alt": "Mexico", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4686", + "uid": "s:2000~a:4686", + "type": "athlete", + "order": 4, + "winner": false, + "athlete": { + "fullName": "Carlos Sainz", + "displayName": "Carlos Sainz", + "shortName": "C. Sainz", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/esp.png", + "alt": "Spain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5579", + "uid": "s:2000~a:5579", + "type": "athlete", + "order": 5, + "winner": false, + "athlete": { + "fullName": "Lando Norris", + "displayName": "Lando Norris", + "shortName": "L. Norris", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/gbr.png", + "alt": "Britain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5718", + "uid": "s:2000~a:5718", + "type": "athlete", + "order": 6, + "winner": false, + "athlete": { + "fullName": "Nyck de Vries", + "displayName": "Nyck de Vries", + "shortName": "N. de Vries", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/ned.png", + "alt": "Netherlands", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4775", + "uid": "s:2000~a:4775", + "type": "athlete", + "order": 7, + "winner": false, + "athlete": { + "fullName": "Lance Strollz", + "displayName": "Lance Strollz", + "shortName": "L. Strollz", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/can.png", + "alt": "Canada", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "348", + "uid": "s:2000~a:348", + "type": "athlete", + "order": 8, + "winner": false, + "athlete": { + "fullName": "Fernando Alonso", + "displayName": "Fernando Alonso", + "shortName": "F. Alonso", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/esp.png", + "alt": "Spain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5592", + "uid": "s:2000~a:5592", + "type": "athlete", + "order": 9, + "winner": false, + "athlete": { + "fullName": "Alexander Albon", + "displayName": "Alexander Albon", + "shortName": "A. Albon", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/tha.png", + "alt": "Thailand", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5682", + "uid": "s:2000~a:5682", + "type": "athlete", + "order": 10, + "winner": false, + "athlete": { + "fullName": "Zhou Guanyu", + "displayName": "Zhou Guanyu", + "shortName": "Z. Guanyu", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/chn.png", + "alt": "China", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "868", + "uid": "s:2000~a:868", + "type": "athlete", + "order": 11, + "winner": false, + "athlete": { + "fullName": "Lewis Hamilton", + "displayName": "Lewis Hamilton", + "shortName": "L. Hamilton", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/gbr.png", + "alt": "Britain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5752", + "uid": "s:2000~a:5752", + "type": "athlete", + "order": 12, + "winner": false, + "athlete": { + "fullName": "Oscar Piastri", + "displayName": "Oscar Piastri", + "shortName": "O. Piastri", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/aus.png", + "alt": "Australia", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4520", + "uid": "s:2000~a:4520", + "type": "athlete", + "order": 13, + "winner": false, + "athlete": { + "fullName": "Valtteri Bottas", + "displayName": "Valtteri Bottas", + "shortName": "V. Bottas", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/fin.png", + "alt": "Finland", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5652", + "uid": "s:2000~a:5652", + "type": "athlete", + "order": 14, + "winner": false, + "athlete": { + "fullName": "Yuki Tsunoda", + "displayName": "Yuki Tsunoda", + "shortName": "Y. Tsunoda", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/jpn.png", + "alt": "Japan", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4396", + "uid": "s:2000~a:4396", + "type": "athlete", + "order": 15, + "winner": false, + "athlete": { + "fullName": "Nico Hülkenberg", + "displayName": "Nico Hülkenberg", + "shortName": "N. Hülkenberg", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/ger.png", + "alt": "Germany", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5745", + "uid": "s:2000~a:5745", + "type": "athlete", + "order": 16, + "winner": false, + "athlete": { + "fullName": "Logan Sageant", + "displayName": "Logan Sageant", + "shortName": "L. Sageant", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/usa.png", + "alt": "USA", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5503", + "uid": "s:2000~a:5503", + "type": "athlete", + "order": 17, + "winner": false, + "athlete": { + "fullName": "George Russell", + "displayName": "George Russell", + "shortName": "G. Russell", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/gbr.png", + "alt": "Britain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4678", + "uid": "s:2000~a:4678", + "type": "athlete", + "order": 18, + "winner": false, + "athlete": { + "fullName": "Esteban Ocon", + "displayName": "Esteban Ocon", + "shortName": "E. Ocon", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/fra.png", + "alt": "France", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5501", + "uid": "s:2000~a:5501", + "type": "athlete", + "order": 19, + "winner": false, + "athlete": { + "fullName": "Pierre Gasly", + "displayName": "Pierre Gasly", + "shortName": "P. Gasly", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/fra.png", + "alt": "France", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4623", + "uid": "s:2000~a:4623", + "type": "athlete", + "order": 20, + "winner": false, + "athlete": { + "fullName": "Kevin Magnussen", + "displayName": "Kevin Magnussen", + "shortName": "K. Magnussen", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/den.png", + "alt": "Denmark", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + } + ], + "status": { + "clock": 0, + "displayClock": "0:00", + "period": 22, + "type": { + "id": "3", + "name": "STATUS_FINAL", + "state": "post", + "completed": true, + "description": "Final", + "detail": "Final", + "shortDetail": "Final" + } + }, + "broadcasts": [ + { + "market": "national", + "names": [ + "ESPN2" + ] + } + ], + "startDate": "2023-04-28T09:30Z", + "geoBroadcasts": [ + { + "type": { + "id": "1", + "shortName": "TV" + }, + "market": { + "id": "1", + "type": "National" + }, + "media": { + "shortName": "ESPN2" + }, + "lang": "en", + "region": "us" + } + ] + }, + { + "id": "401511284", + "uid": "s:2000~l:2030~e:600026751~c:401511284", + "date": "2023-04-28T13:00Z", + "type": { + "id": "2", + "abbreviation": "Qual" + }, + "timeValid": true, + "recent": false, + "competitors": [ + { + "id": "5498", + "uid": "s:2000~a:5498", + "type": "athlete", + "order": 1, + "winner": false, + "athlete": { + "fullName": "Cherles Leclerc", + "displayName": "Cherles Leclerc", + "shortName": "C. Leclerc", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/mon.png", + "alt": "Monaco", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4665", + "uid": "s:2000~a:4665", + "type": "athlete", + "order": 2, + "winner": false, + "athlete": { + "fullName": "Max Verstappen", + "displayName": "Max Verstappen", + "shortName": "M. Verstappen", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/ned.png", + "alt": "Netherlands", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4472", + "uid": "s:2000~a:4472", + "type": "athlete", + "order": 3, + "winner": false, + "athlete": { + "fullName": "Sergio Pérez", + "displayName": "Sergio Pérez", + "shortName": "S. Pérez", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/mex.png", + "alt": "Mexico", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4686", + "uid": "s:2000~a:4686", + "type": "athlete", + "order": 4, + "winner": false, + "athlete": { + "fullName": "Carlos Sainz", + "displayName": "Carlos Sainz", + "shortName": "C. Sainz", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/esp.png", + "alt": "Spain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "868", + "uid": "s:2000~a:868", + "type": "athlete", + "order": 5, + "winner": false, + "athlete": { + "fullName": "Lewis Hamilton", + "displayName": "Lewis Hamilton", + "shortName": "L. Hamilton", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/gbr.png", + "alt": "Britain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "348", + "uid": "s:2000~a:348", + "type": "athlete", + "order": 6, + "winner": false, + "athlete": { + "fullName": "Fernando Alonso", + "displayName": "Fernando Alonso", + "shortName": "F. Alonso", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/esp.png", + "alt": "Spain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5579", + "uid": "s:2000~a:5579", + "type": "athlete", + "order": 7, + "winner": false, + "athlete": { + "fullName": "Lando Norris", + "displayName": "Lando Norris", + "shortName": "L. Norris", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/gbr.png", + "alt": "Britain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5652", + "uid": "s:2000~a:5652", + "type": "athlete", + "order": 8, + "winner": false, + "athlete": { + "fullName": "Yuki Tsunoda", + "displayName": "Yuki Tsunoda", + "shortName": "Y. Tsunoda", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/jpn.png", + "alt": "Japan", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4775", + "uid": "s:2000~a:4775", + "type": "athlete", + "order": 9, + "winner": false, + "athlete": { + "fullName": "Lance Stroll", + "displayName": "Lance Stroll", + "shortName": "L. Stroll", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/can.png", + "alt": "Canada", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5752", + "uid": "s:2000~a:5752", + "type": "athlete", + "order": 10, + "winner": false, + "athlete": { + "fullName": "Oscar Piastri", + "displayName": "Oscar Piastri", + "shortName": "O. Piastri", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/aus.png", + "alt": "Australia", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5503", + "uid": "s:2000~a:5503", + "type": "athlete", + "order": 11, + "winner": false, + "athlete": { + "fullName": "George Russell", + "displayName": "George Russell", + "shortName": "G. Russell", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/gbr.png", + "alt": "Britain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4678", + "uid": "s:2000~a:4678", + "type": "athlete", + "order": 12, + "winner": false, + "athlete": { + "fullName": "Esteban Ocon", + "displayName": "Esteban Ocon", + "shortName": "E. Ocon", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/fra.png", + "alt": "France", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5592", + "uid": "s:2000~a:5592", + "type": "athlete", + "order": 13, + "winner": false, + "athlete": { + "fullName": "Alexander Albon", + "displayName": "Alexander Albon", + "shortName": "A. Albon", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/tha.png", + "alt": "Thailand", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4520", + "uid": "s:2000~a:4520", + "type": "athlete", + "order": 14, + "winner": false, + "athlete": { + "fullName": "Valtteri Bottas", + "displayName": "Valtteri Bottas", + "shortName": "V. Bottas", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/fin.png", + "alt": "Finland", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5745", + "uid": "s:2000~a:5745", + "type": "athlete", + "order": 15, + "winner": false, + "athlete": { + "fullName": "Logan Sageant", + "displayName": "Logan Sageant", + "shortName": "L. Sageant", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/usa.png", + "alt": "USA", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5682", + "uid": "s:2000~a:5682", + "type": "athlete", + "order": 16, + "winner": false, + "athlete": { + "fullName": "Zhou Guanyu", + "displayName": "Zhou Guanyu", + "shortName": "Z. Guanyu", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/chn.png", + "alt": "China", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4396", + "uid": "s:2000~a:4396", + "type": "athlete", + "order": 17, + "winner": false, + "athlete": { + "fullName": "Nico Hülkenberg", + "displayName": "Nico Hülkenberg", + "shortName": "N. Hülkenberg", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/ger.png", + "alt": "Germany", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4623", + "uid": "s:2000~a:4623", + "type": "athlete", + "order": 18, + "winner": false, + "athlete": { + "fullName": "Kevin Magnussen", + "displayName": "Kevin Magnussen", + "shortName": "K. Magnussen", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/den.png", + "alt": "Denmark", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5501", + "uid": "s:2000~a:5501", + "type": "athlete", + "order": 19, + "winner": false, + "athlete": { + "fullName": "Pierre Gasly", + "displayName": "Pierre Gasly", + "shortName": "P. Gasly", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/fra.png", + "alt": "France", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5718", + "uid": "s:2000~a:5718", + "type": "athlete", + "order": 20, + "winner": false, + "athlete": { + "fullName": "Nyck de Vries", + "displayName": "Nyck de Vries", + "shortName": "N. de Vries", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/ned.png", + "alt": "Netherlands", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + } + ], + "status": { + "clock": 0, + "displayClock": "0:00", + "period": 21, + "type": { + "id": "3", + "name": "STATUS_FINAL", + "state": "post", + "completed": true, + "description": "Final", + "detail": "Final", + "shortDetail": "Final" + } + }, + "broadcasts": [ + { + "market": "national", + "names": [ + "ESPNU" + ] + } + ], + "startDate": "2023-04-28T13:00Z", + "geoBroadcasts": [ + { + "type": { + "id": "1", + "shortName": "TV" + }, + "market": { + "id": "1", + "type": "National" + }, + "media": { + "shortName": "ESPNU" + }, + "lang": "en", + "region": "us" + } + ] + }, + { + "id": "401511285", + "uid": "s:2000~l:2030~e:600026751~c:401511285", + "date": "2023-04-29T08:30Z", + "type": { + "id": "5" + }, + "timeValid": true, + "recent": true, + "competitors": [ + { + "id": "5498", + "uid": "s:2000~a:5498", + "type": "athlete", + "order": 1, + "winner": false, + "athlete": { + "fullName": "Cherles Leclerc", + "displayName": "Cherles Leclerc", + "shortName": "C. Leclerc", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/mon.png", + "alt": "Monaco", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4472", + "uid": "s:2000~a:4472", + "type": "athlete", + "order": 2, + "winner": false, + "athlete": { + "fullName": "Sergio Pérez", + "displayName": "Sergio Pérez", + "shortName": "S. Pérez", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/mex.png", + "alt": "Mexico", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4665", + "uid": "s:2000~a:4665", + "type": "athlete", + "order": 3, + "winner": false, + "athlete": { + "fullName": "Max Verstappen", + "displayName": "Max Verstappen", + "shortName": "M. Verstappen", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/ned.png", + "alt": "Netherlands", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5503", + "uid": "s:2000~a:5503", + "type": "athlete", + "order": 4, + "winner": false, + "athlete": { + "fullName": "George Russell", + "displayName": "George Russell", + "shortName": "G. Russell", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/gbr.png", + "alt": "Britain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4686", + "uid": "s:2000~a:4686", + "type": "athlete", + "order": 5, + "winner": false, + "athlete": { + "fullName": "Carlos Sainz", + "displayName": "Carlos Sainz", + "shortName": "C. Sainz", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/esp.png", + "alt": "Spain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "868", + "uid": "s:2000~a:868", + "type": "athlete", + "order": 6, + "winner": false, + "athlete": { + "fullName": "Lewis Hamilton", + "displayName": "Lewis Hamilton", + "shortName": "L. Hamilton", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/gbr.png", + "alt": "Britain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5592", + "uid": "s:2000~a:5592", + "type": "athlete", + "order": 7, + "winner": false, + "athlete": { + "fullName": "Alexander Albon", + "displayName": "Alexander Albon", + "shortName": "A. Albon", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/tha.png", + "alt": "Thailand", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "348", + "uid": "s:2000~a:348", + "type": "athlete", + "order": 8, + "winner": false, + "athlete": { + "fullName": "Fernando Alonso", + "displayName": "Fernando Alonso", + "shortName": "F. Alonso", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/esp.png", + "alt": "Spain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4775", + "uid": "s:2000~a:4775", + "type": "athlete", + "order": 9, + "winner": false, + "athlete": { + "fullName": "Lance Stroll", + "displayName": "Lance Stroll", + "shortName": "L. Stroll", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/can.png", + "alt": "Canada", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5579", + "uid": "s:2000~a:5579", + "type": "athlete", + "order": 10, + "winner": false, + "athlete": { + "fullName": "Lando Norris", + "displayName": "Lando Norris", + "shortName": "L. Norris", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/gbr.png", + "alt": "Britain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5752", + "uid": "s:2000~a:5752", + "type": "athlete", + "order": 11, + "winner": false, + "athlete": { + "fullName": "Oscar Piastri", + "displayName": "Oscar Piastri", + "shortName": "O. Piastri", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/aus.png", + "alt": "Australia", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4396", + "uid": "s:2000~a:4396", + "type": "athlete", + "order": 12, + "winner": false, + "athlete": { + "fullName": "Nico Hülkenberg", + "displayName": "Nico Hülkenberg", + "shortName": "N. Hülkenberg", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/ger.png", + "alt": "Germany", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4678", + "uid": "s:2000~a:4678", + "type": "athlete", + "order": 13, + "winner": false, + "athlete": { + "fullName": "Esteban Ocon", + "displayName": "Esteban Ocon", + "shortName": "E. Ocon", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/fra.png", + "alt": "France", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4623", + "uid": "s:2000~a:4623", + "type": "athlete", + "order": 14, + "winner": false, + "athlete": { + "fullName": "Kevin Magnussen", + "displayName": "Kevin Magnussen", + "shortName": "K. Magnussen", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/den.png", + "alt": "Denmark", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5745", + "uid": "s:2000~a:5745", + "type": "athlete", + "order": 15, + "winner": false, + "athlete": { + "fullName": "Logan Sageant", + "displayName": "Logan Sageant", + "shortName": "L. Sageant", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/usa.png", + "alt": "USA", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5682", + "uid": "s:2000~a:5682", + "type": "athlete", + "order": 16, + "winner": false, + "athlete": { + "fullName": "Zhou Guanyu", + "displayName": "Zhou Guanyu", + "shortName": "Z. Guanyu", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/chn.png", + "alt": "China", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4520", + "uid": "s:2000~a:4520", + "type": "athlete", + "order": 17, + "winner": false, + "athlete": { + "fullName": "Valtteri Bottas", + "displayName": "Valtteri Bottas", + "shortName": "V. Bottas", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/fin.png", + "alt": "Finland", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5652", + "uid": "s:2000~a:5652", + "type": "athlete", + "order": 18, + "winner": false, + "athlete": { + "fullName": "Yuki Tsunoda", + "displayName": "Yuki Tsunoda", + "shortName": "Y. Tsunoda", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/jpn.png", + "alt": "Japan", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5501", + "uid": "s:2000~a:5501", + "type": "athlete", + "order": 19, + "winner": false, + "athlete": { + "fullName": "Pierre Gasly", + "displayName": "Pierre Gasly", + "shortName": "P. Gasly", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/fra.png", + "alt": "France", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5718", + "uid": "s:2000~a:5718", + "type": "athlete", + "order": 20, + "winner": false, + "athlete": { + "fullName": "Nyck de Vries", + "displayName": "Nyck de Vries", + "shortName": "N. de Vries", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/ned.png", + "alt": "Netherlands", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + } + ], + "status": { + "clock": 0, + "displayClock": "0:00", + "period": 14, + "type": { + "id": "3", + "name": "STATUS_FINAL", + "state": "post", + "completed": true, + "description": "Final", + "detail": "Final", + "shortDetail": "Final" + } + }, + "broadcasts": [ + { + "market": "national", + "names": [ + "ESPN2" + ] + } + ], + "startDate": "2023-04-29T08:30Z", + "geoBroadcasts": [ + { + "type": { + "id": "1", + "shortName": "TV" + }, + "market": { + "id": "1", + "type": "National" + }, + "media": { + "shortName": "ESPN2" + }, + "lang": "en", + "region": "us" + } + ] + }, + { + "id": "401511286", + "uid": "s:2000~l:2030~e:600026751~c:401511286", + "date": "2023-04-29T13:30Z", + "type": { + "id": "4", + "abbreviation": "SQ" + }, + "timeValid": true, + "recent": true, + "competitors": [ + { + "id": "5498", + "uid": "s:2000~a:5498", + "type": "athlete", + "order": 1, + "winner": false, + "athlete": { + "fullName": "Cherles Leclerc", + "displayName": "Cherles Leclerc", + "shortName": "C. Leclerc", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/mon.png", + "alt": "Monaco", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4472", + "uid": "s:2000~a:4472", + "type": "athlete", + "order": 2, + "winner": false, + "athlete": { + "fullName": "Sergio Pérez", + "displayName": "Sergio Pérez", + "shortName": "S. Pérez", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/mex.png", + "alt": "Mexico", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5503", + "uid": "s:2000~a:5503", + "type": "athlete", + "order": 3, + "winner": false, + "athlete": { + "fullName": "George Russell", + "displayName": "George Russell", + "shortName": "G. Russell", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/gbr.png", + "alt": "Britain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4665", + "uid": "s:2000~a:4665", + "type": "athlete", + "order": 4, + "winner": false, + "athlete": { + "fullName": "Max Verstappen", + "displayName": "Max Verstappen", + "shortName": "M. Verstappen", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/ned.png", + "alt": "Netherlands", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4686", + "uid": "s:2000~a:4686", + "type": "athlete", + "order": 5, + "winner": false, + "athlete": { + "fullName": "Carlos Sainz", + "displayName": "Carlos Sainz", + "shortName": "C. Sainz", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/esp.png", + "alt": "Spain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "868", + "uid": "s:2000~a:868", + "type": "athlete", + "order": 6, + "winner": false, + "athlete": { + "fullName": "Lewis Hamilton", + "displayName": "Lewis Hamilton", + "shortName": "L. Hamilton", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/gbr.png", + "alt": "Britain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "348", + "uid": "s:2000~a:348", + "type": "athlete", + "order": 7, + "winner": false, + "athlete": { + "fullName": "Fernando Alonso", + "displayName": "Fernando Alonso", + "shortName": "F. Alonso", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/esp.png", + "alt": "Spain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5592", + "uid": "s:2000~a:5592", + "type": "athlete", + "order": 8, + "winner": false, + "athlete": { + "fullName": "Alexander Albon", + "displayName": "Alexander Albon", + "shortName": "A. Albon", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/tha.png", + "alt": "Thailand", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5579", + "uid": "s:2000~a:5579", + "type": "athlete", + "order": 9, + "winner": false, + "athlete": { + "fullName": "Lando Norris", + "displayName": "Lando Norris", + "shortName": "L. Norris", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/gbr.png", + "alt": "Britain", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4775", + "uid": "s:2000~a:4775", + "type": "athlete", + "order": 10, + "winner": false, + "athlete": { + "fullName": "Lance Stroll", + "displayName": "Lance Stroll", + "shortName": "L. Stroll", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/can.png", + "alt": "Canada", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5752", + "uid": "s:2000~a:5752", + "type": "athlete", + "order": 11, + "winner": false, + "athlete": { + "fullName": "Oscar Piastri", + "displayName": "Oscar Piastri", + "shortName": "O. Piastri", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/aus.png", + "alt": "Australia", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4396", + "uid": "s:2000~a:4396", + "type": "athlete", + "order": 12, + "winner": false, + "athlete": { + "fullName": "Nico Hülkenberg", + "displayName": "Nico Hülkenberg", + "shortName": "N. Hülkenberg", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/ger.png", + "alt": "Germany", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4623", + "uid": "s:2000~a:4623", + "type": "athlete", + "order": 13, + "winner": false, + "athlete": { + "fullName": "Kevin Magnussen", + "displayName": "Kevin Magnussen", + "shortName": "K. Magnussen", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/den.png", + "alt": "Denmark", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4520", + "uid": "s:2000~a:4520", + "type": "athlete", + "order": 14, + "winner": false, + "athlete": { + "fullName": "Valtteri Bottas", + "displayName": "Valtteri Bottas", + "shortName": "V. Bottas", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/fin.png", + "alt": "Finland", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5682", + "uid": "s:2000~a:5682", + "type": "athlete", + "order": 15, + "winner": false, + "athlete": { + "fullName": "Zhou Guanyu", + "displayName": "Zhou Guanyu", + "shortName": "Z. Guanyu", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/chn.png", + "alt": "China", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5501", + "uid": "s:2000~a:5501", + "type": "athlete", + "order": 16, + "winner": false, + "athlete": { + "fullName": "Pierre Gasly", + "displayName": "Pierre Gasly", + "shortName": "P. Gasly", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/fra.png", + "alt": "France", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5718", + "uid": "s:2000~a:5718", + "type": "athlete", + "order": 17, + "winner": false, + "athlete": { + "fullName": "Nyck de Vries", + "displayName": "Nyck de Vries", + "shortName": "N. de Vries", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/ned.png", + "alt": "Netherlands", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "4678", + "uid": "s:2000~a:4678", + "type": "athlete", + "order": 18, + "winner": false, + "athlete": { + "fullName": "Esteban Ocon", + "displayName": "Esteban Ocon", + "shortName": "E. Ocon", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/fra.png", + "alt": "France", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5652", + "uid": "s:2000~a:5652", + "type": "athlete", + "order": 19, + "winner": false, + "athlete": { + "fullName": "Yuki Tsunoda", + "displayName": "Yuki Tsunoda", + "shortName": "Y. Tsunoda", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/jpn.png", + "alt": "Japan", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + }, + { + "id": "5745", + "uid": "s:2000~a:5745", + "type": "athlete", + "order": 20, + "winner": false, + "athlete": { + "fullName": "Logan Sageant", + "displayName": "Logan Sageant", + "shortName": "L. Sageant", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/usa.png", + "alt": "USA", + "rel": [ + "country-flag" + ] + } + }, + "statistics": [] + } + ], + "status": { + "clock": 0, + "displayClock": "0:00", + "period": 3, + "type": { + "id": "2", + "name": "STATUS_IN_PROGRESS", + "state": "in", + "completed": false, + "description": "In Progress", + "detail": "In Progress", + "shortDetail": "In Progress" + } + }, + "broadcasts": [ + { + "market": "national", + "names": [ + "ESPN" + ] + } + ], + "startDate": "2023-04-29T13:30Z", + "geoBroadcasts": [ + { + "type": { + "id": "1", + "shortName": "TV" + }, + "market": { + "id": "1", + "type": "National" + }, + "media": { + "shortName": "ESPN" + }, + "lang": "en", + "region": "us" + } + ] + }, + { + "id": "401505955", + "uid": "s:2000~l:2030~e:600026751~c:401505955", + "date": "2023-04-30T11:00Z", + "type": { + "id": "3", + "abbreviation": "Race" + }, + "timeValid": true, + "recent": false, + "competitors": [ + { + "id": "5498", + "uid": "s:2000~a:5498", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Cherles Leclerc", + "displayName": "Cherles Leclerc", + "shortName": "C. Leclerc", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/mon.png", + "alt": "Monaco", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "4665", + "uid": "s:2000~a:4665", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Max Verstappen", + "displayName": "Max Verstappen", + "shortName": "M. Verstappen", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/ned.png", + "alt": "Netherlands", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "4472", + "uid": "s:2000~a:4472", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Sergio Pérez", + "displayName": "Sergio Pérez", + "shortName": "S. Pérez", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/mex.png", + "alt": "Mexico", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "4686", + "uid": "s:2000~a:4686", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Carlos Saintz", + "displayName": "Carlos Saintz", + "shortName": "C. Saintz", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/esp.png", + "alt": "Spain", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "868", + "uid": "s:2000~a:868", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Lewis Hamilton", + "displayName": "Lewis Hamilton", + "shortName": "L. Hamilton", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/gbr.png", + "alt": "Britain", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "348", + "uid": "s:2000~a:348", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Fernando Alonso", + "displayName": "Fernando Alonso", + "shortName": "F. Alonso", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/esp.png", + "alt": "Spain", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "5579", + "uid": "s:2000~a:5579", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Lando Norris", + "displayName": "Lando Norris", + "shortName": "L. Norris", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/gbr.png", + "alt": "Britain", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "5652", + "uid": "s:2000~a:5652", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Yuki Tsunoda", + "displayName": "Yuki Tsunoda", + "shortName": "Y. Tsunoda", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/jpn.png", + "alt": "Japan", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "4775", + "uid": "s:2000~a:4775", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Lance Stroll", + "displayName": "Lance Stroll", + "shortName": "L. Stroll", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/can.png", + "alt": "Canada", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "5752", + "uid": "s:2000~a:5752", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Oscar Piastri", + "displayName": "Oscar Piastri", + "shortName": "O. Piastri", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/aus.png", + "alt": "Australia", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "5503", + "uid": "s:2000~a:5503", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "George Russell", + "displayName": "George Russell", + "shortName": "G. Russell", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/gbr.png", + "alt": "Britain", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "4678", + "uid": "s:2000~a:4678", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Esteban Ocon", + "displayName": "Esteban Ocon", + "shortName": "E. Ocon", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/fra.png", + "alt": "France", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "5592", + "uid": "s:2000~a:5592", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Alexander Albon", + "displayName": "Alexander Albon", + "shortName": "A. Albon", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/tha.png", + "alt": "Thailand", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "4520", + "uid": "s:2000~a:4520", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Valtteri Bottas", + "displayName": "Valtteri Bottas", + "shortName": "V. Bottas", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/fin.png", + "alt": "Finland", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "5745", + "uid": "s:2000~a:5745", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Logan Sageant", + "displayName": "Logan Sageant", + "shortName": "L. Sageant", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/usa.png", + "alt": "USA", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "5682", + "uid": "s:2000~a:5682", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Zhou Guanyu", + "displayName": "Zhou Guanyu", + "shortName": "Z. Guanyu", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/chn.png", + "alt": "China", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "4396", + "uid": "s:2000~a:4396", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Nico Hülkenberg", + "displayName": "Nico Hülkenberg", + "shortName": "N. Hülkenberg", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/ger.png", + "alt": "Germany", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "4623", + "uid": "s:2000~a:4623", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Kevin Magnussen", + "displayName": "Kevin Magnussen", + "shortName": "K. Magnussen", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/den.png", + "alt": "Denmark", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "5501", + "uid": "s:2000~a:5501", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Pierre Gasly", + "displayName": "Pierre Gasly", + "shortName": "P. Gasly", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/fra.png", + "alt": "France", + "rel": [ + "country-flag" + ] + } + } + }, + { + "id": "5718", + "uid": "s:2000~a:5718", + "type": "athlete", + "winner": false, + "athlete": { + "fullName": "Nyck de Vries", + "displayName": "Nyck de Vries", + "shortName": "N. de Vries", + "flag": { + "href": "https://a.espncdn.com/i/teamlogos/countries/500/ned.png", + "alt": "Netherlands", + "rel": [ + "country-flag" + ] + } + } + } + ], + "status": { + "clock": 0, + "displayClock": "0:00", + "period": 0, + "type": { + "id": "1", + "name": "STATUS_SCHEDULED", + "state": "pre", + "completed": false, + "description": "Scheduled", + "detail": "Sun, April 30th at 7:00 AM EDT", + "shortDetail": "4/30 - 7:00 AM EDT" + } + }, + "broadcasts": [ + { + "market": "national", + "names": [ + "ESPN" + ] + } + ], + "startDate": "2023-04-30T11:00Z", + "geoBroadcasts": [ + { + "type": { + "id": "1", + "shortName": "TV" + }, + "market": { + "id": "1", + "type": "National" + }, + "media": { + "shortName": "ESPN" + }, + "lang": "en", + "region": "us" + } + ] + } + ], + "links": [ + { + "language": "en-US", + "rel": [ + "summary", + "desktop", + "event" + ], + "href": "https://www.espn.com/f1/race/_/id/600026751", + "text": "Gamecast", + "shortText": "Gamecast", + "isExternal": false, + "isPremium": false + }, + { + "language": "en-US", + "rel": [ + "report", + "desktop", + "event" + ], + "href": "https://www.espn.com/f1/report/_/id/600026751", + "text": "Report", + "shortText": "Report", + "isExternal": false, + "isPremium": false + }, + { + "language": "en-US", + "rel": [ + "circuit", + "desktop", + "event" + ], + "href": "https://www.espn.com/f1/circuit?id=600026751", + "text": "Circuit", + "shortText": "Circuit", + "isExternal": false, + "isPremium": false + }, + { + "language": "en-US", + "rel": [ + "results", + "desktop", + "event" + ], + "href": "https://www.espn.com/f1/results?id=600026751", + "text": "Results", + "shortText": "Results", + "isExternal": false, + "isPremium": false + } + ], + "circuit": { + "id": "607", + "fullName": "Baku City Circuit", + "address": { + "city": "Baku", + "country": "Azerbaijan" + } + }, + "status": { + "clock": 0, + "displayClock": "0:00", + "period": 22, + "type": { + "id": "3", + "name": "STATUS_FINAL", + "state": "post", + "completed": true, + "description": "Final", + "detail": "Final", + "shortDetail": "Final" + } + } } ] } \ No newline at end of file diff --git a/tests/tt/results/test_tt_all_test29.json b/tests/tt/results/test_tt_all_test29.json new file mode 100644 index 0000000..eaf4932 --- /dev/null +++ b/tests/tt/results/test_tt_all_test29.json @@ -0,0 +1,56 @@ +{ + "sport": "racing", + "league": "F1", + "league_logo": "https://a.espncdn.com/i/teamlogos/leagues/500/mlb.png", + "team_abbr": "SAINTZ", + "opponent_abbr": null, + "event_name": "Azerbaijan GP", + "date": "2023-04-30T11:00Z", + "kickoff_in": "{test} days", + "venue": "Baku City Circuit", + "location": "Baku, Azerbaijan", + "tv_network": "ESPN", + "odds": null, + "overunder": null, + "team_name": "Carlos Saintz", + "team_id": "4686", + "team_record": null, + "team_rank": 4, + "team_homeaway": null, + "team_logo": "https://a.espncdn.com/i/teamlogos/countries/500/esp.png", + "team_colors": null, + "team_score": 4, + "team_win_probability": null, + "team_timeouts": null, + "opponent_name": "Cherles Leclerc", + "opponent_id": "5498", + "opponent_record": null, + "opponent_rank": 1, + "opponent_homeaway": null, + "opponent_logo": "https://a.espncdn.com/i/teamlogos/countries/500/mon.png", + "opponent_colors": null, + "opponent_score": 1, + "opponent_win_probability": null, + "opponent_timeouts": null, + "quarter": "Race", + "clock": "4/30 - 7:00 AM EDT", + "possession": null, + "last_play": "0. C. Leclerc, 1. M. Verstappen, 2. S. P\u00e9rez, 3. C. Saintz, 4. L. Hamilton, 5. F. Alonso, 6. L. Norris, 7. Y. Tsunoda, 8. L. Stroll, 9. O. Piastri, ", + "down_distance_text": null, + "outs": null, + "balls": null, + "strikes": null, + "on_first": null, + "on_second": null, + "on_third": null, + "team_shots_on_target": null, + "team_total_shots": 0, + "opponent_shots_on_target": null, + "opponent_total_shots": null, + "team_sets_won": null, + "opponent_sets_won": null, + "last_update": "2022-02-02 02:02:02-05:00", + "api_message": null, + "private_fast_refresh": false, + "state": "PRE" +} \ No newline at end of file diff --git a/tests/tt/results/test_tt_all_test30.json b/tests/tt/results/test_tt_all_test30.json new file mode 100644 index 0000000..ee4c71b --- /dev/null +++ b/tests/tt/results/test_tt_all_test30.json @@ -0,0 +1,56 @@ +{ + "sport": "racing", + "league": "F1", + "league_logo": "https://a.espncdn.com/i/teamlogos/leagues/500/mlb.png", + "team_abbr": "VERSTAPPEN", + "opponent_abbr": null, + "event_name": "Azerbaijan GP", + "date": "2023-04-29T13:30Z", + "kickoff_in": "{test} days", + "venue": "Baku City Circuit", + "location": "Baku, Azerbaijan", + "tv_network": "ESPN", + "odds": null, + "overunder": null, + "team_name": "Max Verstappen", + "team_id": "4665", + "team_record": null, + "team_rank": null, + "team_homeaway": null, + "team_logo": "https://a.espncdn.com/i/teamlogos/countries/500/ned.png", + "team_colors": null, + "team_score": 4, + "team_win_probability": 0.0, + "team_timeouts": null, + "opponent_name": "Cherles Leclerc", + "opponent_id": "5498", + "opponent_record": null, + "opponent_rank": null, + "opponent_homeaway": null, + "opponent_logo": "https://a.espncdn.com/i/teamlogos/countries/500/mon.png", + "opponent_colors": null, + "opponent_score": 1, + "opponent_win_probability": 0.0, + "opponent_timeouts": null, + "quarter": "SQ", + "clock": "In Progress", + "possession": null, + "last_play": "1. C. Leclerc, 2. S. P\u00e9rez, 3. G. Russell, 4. M. Verstappen, 5. C. Sainz, 6. L. Hamilton, 7. F. Alonso, 8. A. Albon, 9. L. Norris, 10. L. Stroll, ", + "down_distance_text": null, + "outs": null, + "balls": null, + "strikes": null, + "on_first": null, + "on_second": null, + "on_third": null, + "team_shots_on_target": null, + "team_total_shots": 3, + "opponent_shots_on_target": null, + "opponent_total_shots": null, + "team_sets_won": null, + "opponent_sets_won": null, + "last_update": "2022-02-02 02:02:02-05:00", + "api_message": null, + "private_fast_refresh": true, + "state": "IN" +} \ No newline at end of file diff --git a/tests/tt/results/test_tt_all_test31.json b/tests/tt/results/test_tt_all_test31.json new file mode 100644 index 0000000..789b924 --- /dev/null +++ b/tests/tt/results/test_tt_all_test31.json @@ -0,0 +1,56 @@ +{ + "sport": "racing", + "league": "F1", + "league_logo": "https://a.espncdn.com/i/teamlogos/leagues/500/mlb.png", + "team_abbr": "STROLLZ", + "opponent_abbr": null, + "event_name": "Azerbaijan GP", + "date": "2023-04-28T09:30Z", + "kickoff_in": "{test} days", + "venue": "Baku City Circuit", + "location": "Baku, Azerbaijan", + "tv_network": "ESPN2", + "odds": null, + "overunder": null, + "team_name": "Lance Strollz", + "team_id": "4775", + "team_record": null, + "team_rank": null, + "team_homeaway": null, + "team_logo": "https://a.espncdn.com/i/teamlogos/countries/500/can.png", + "team_colors": null, + "team_score": 7, + "team_win_probability": null, + "team_timeouts": null, + "opponent_name": "Max Verstappen", + "opponent_id": "4665", + "opponent_record": null, + "opponent_rank": null, + "opponent_homeaway": null, + "opponent_logo": "https://a.espncdn.com/i/teamlogos/countries/500/ned.png", + "opponent_colors": null, + "opponent_score": 1, + "opponent_win_probability": null, + "opponent_timeouts": null, + "quarter": "FP1", + "clock": "Final", + "possession": null, + "last_play": "1. M. Verstappen, 2. C. Leclerc, 3. S. P\u00e9rez, 4. C. Sainz, 5. L. Norris, 6. N. de Vries, 7. L. Strollz, 8. F. Alonso, 9. A. Albon, 10. Z. Guanyu, ", + "down_distance_text": null, + "outs": null, + "balls": null, + "strikes": null, + "on_first": null, + "on_second": null, + "on_third": null, + "team_shots_on_target": null, + "team_total_shots": 22, + "opponent_shots_on_target": null, + "opponent_total_shots": null, + "team_sets_won": null, + "opponent_sets_won": null, + "last_update": "2022-02-02 02:02:02-05:00", + "api_message": null, + "private_fast_refresh": false, + "state": "POST" +} \ No newline at end of file