Skip to content

New 2019 Maps are not stored in API #3

@ranamerp

Description

@ranamerp

When trying to call new maps introduced in the 2019 season, the map name is not recorded. Here is the code I used to collect data from the API.

`matches = requests.get("https://api.overwatchleague.com/matches/21341")
m = json.loads(matches.text)
#Getting Match Data
def get_match_data(m):
try:
map_1_name = m["games"][0]["attributes"]["map"]
except KeyError:
map_1_name = "None"
map_1_type = MAP_TYPE.get(map_1_name)
map_1_away_points = m["games"][0]["points"][0]
map_1_home_points = m["games"][0]["points"][1]

try:
    map_2_name = m["games"][1]["attributes"]["map"]
except KeyError:
    map_2_name = "None"
map_2_type = MAP_TYPE.get(map_2_name)
map_2_away_points = m["games"][1]["points"][0]
map_2_home_points = m["games"][1]["points"][1]

try:
    map_3_name = m["games"][2]["attributes"]["map"]
except KeyError:
    map_3_name = "None"
map_3_type = MAP_TYPE.get(map_3_name)
map_3_away_points = m["games"][2]["points"][0]
map_3_home_points = m["games"][2]["points"][1]

try:
    map_4_name = m["games"][3]["attributes"]["map"]
except KeyError:
    map_4_name = "None"
map_4_type = MAP_TYPE.get(map_4_name)
map_4_away_points = m["games"][3]["points"][0]
map_4_home_points = m["games"][3]["points"][1]

try:
    map_5_name = m["games"][4]["attributes"]["map"]
    map_5_type = MAP_TYPE.get(map_5_name)
    map_5_away_points = m["games"][4]["points"][0]
    map_5_home_points = m["games"][4]["points"][1]
except (IndexError, KeyError) as e:
    map_5_name = "N/A"
    map_5_type = "N/A"
    map_5_away_points = "N/A"
    map_5_home_points = "N/A"
print("Map 1 Data: ", map_1_name, map_1_type, map_1_away_points, map_1_home_points)
print("Map 2 Data: ",map_2_name, map_2_type, map_2_away_points, map_2_home_points)
print("Map 3 Data: ",map_3_name, map_3_type, map_3_away_points, map_3_home_points)
print("Map 4 Data: ",map_4_name, map_4_type, map_4_away_points, map_4_home_points)
print("Map 5 Data: ",map_5_name, map_5_type, map_5_away_points, map_5_home_points)

`
This calls the Vancouver-Houston game specifically. Here is the response from the API.

Map 1 Data: None None 0 2 Map 2 Data: None None 1 0 Map 3 Data: eichenwalde Hybrid 2 1 Map 4 Data: None None 1 0 Map 5 Data: N/A N/A N/A N/A

Compare that to the London-Shanghai game and we get:
Map 1 Data: nepal Control 2 0 Map 2 Data: kings-row Hybrid 0 3 Map 3 Data: temple-of-anubis Assault 1 0 Map 4 Data: route-66 Escort 0 3 Map 5 Data: ilios Control 1 2

Looking at the Vancouver-Houston game on the website, we see:
heck

3 maps which are new to 2019 were played, but not recorded by the API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions