vasqued2 / ha-teamtracker

Home Assistant integration that provides real-time scores in multiple professional (NBA, NFL, NHL, MLB, MLS, and more), college (NCAA), and international (soccer, golf, tennis, mma, racing) sports using ESPN APIs.
173 stars 20 forks source link

Can we add cricket as well...thanks! #23

Closed arsaboo closed 1 year ago

arsaboo commented 1 year ago

Can we add cricket as well? Espncricinfo has all the information and there is a python wrapper as well:

https://github.com/outside-edge/python-espncricinfo

We can use a team id to track a particular team (e.g., team_id is 6 for India).

I will be happy to test things out.

vasqued2 commented 1 year ago

What's the URL that you pass the team_id into? Is there a URL that returns a list of active/upcoming matches for a league?

Sorry if I'm using the wrong terms. My knowledge of cricket is limited to the one time I played, and the only thing I remember is I'm not supposed to drop the bat after I hit the ball.

Even if we I understand the URL's I'd need your help to understand the terms and hierarchy - matches, innings, series, overs, unders, etc. - to even have a sense if what I could or could not do.

arsaboo commented 1 year ago

HAHA...

Sure...happy to help. To start off, we can just track a team and the card could display any live matches that the team is playing.

Here's the information from one of the live games - USA vs. Namibia:

JSON summary {"centre":{},"comms":[{"ball":[{"comms_id":"","dismissal":"","event":"no run","innings_number":"2","is_tweet":"","over_number":"42","overs_actual":"41.6","overs_unique":"41.06","players":"Taylor to Scholtz","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"1 run","innings_number":"2","is_tweet":"","over_number":"42","overs_actual":"41.5","overs_unique":"41.05","players":"Taylor to Lungameni","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"no run","innings_number":"2","is_tweet":"","over_number":"42","overs_actual":"41.4","overs_unique":"41.04","players":"Taylor to Lungameni","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"no run","innings_number":"2","is_tweet":"","over_number":"42","overs_actual":"41.3","overs_unique":"41.03","players":"Taylor to Lungameni","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"no run","innings_number":"2","is_tweet":"","over_number":"42","overs_actual":"41.2","overs_unique":"41.02","players":"Taylor to Lungameni","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"1 run","innings_number":"2","is_tweet":"","over_number":"42","overs_actual":"41.1","overs_unique":"41.01","players":"Taylor to Scholtz","speed_kph":"","speed_mph":"","text":""}],"batsman":[{"balls_faced":14,"fours":0,"live_current_name":"striker","player_id":"54563","runs":6,"sixes":0},{"balls_faced":9,"fours":0,"live_current_name":"non-striker","player_id":"65868","runs":5,"sixes":0}],"bowler":[{"conceded":41,"live_current_name":"current bowler","maidens":0,"overs":"10.0","player_id":56870,"wickets":2},{"conceded":28,"live_current_name":"previous bowler","maidens":0,"overs":"8.0","player_id":93827,"wickets":2}],"event_string":"2 runs","innings_number":2,"over_complete":1,"over_number":"42","required_string":"86 runs required from 48 balls, RR: 3.78, RRR: 10.75","runs":159,"team_id":28,"wickets":9},{"ball":[{"comms_id":"","dismissal":"","event":"no run","innings_number":"2","is_tweet":"","over_number":"41","overs_actual":"40.6","overs_unique":"40.06","players":"Kenjige to Lungameni","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"no run","innings_number":"2","is_tweet":"","over_number":"41","overs_actual":"40.5","overs_unique":"40.05","players":"Kenjige to Lungameni","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"2 runs","innings_number":"2","is_tweet":"","over_number":"41","overs_actual":"40.4","overs_unique":"40.04","players":"Kenjige to Lungameni","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"1 run","innings_number":"2","is_tweet":"","over_number":"41","overs_actual":"40.3","overs_unique":"40.03","players":"Kenjige to Scholtz","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"no run","innings_number":"2","is_tweet":"","over_number":"41","overs_actual":"40.2","overs_unique":"40.02","players":"Kenjige to Scholtz","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"1 run","innings_number":"2","is_tweet":"","over_number":"41","overs_actual":"40.1","overs_unique":"40.01","players":"Kenjige to Lungameni","speed_kph":"","speed_mph":"","text":""}],"batsman":[{"balls_faced":5,"fours":0,"live_current_name":"striker","player_id":"65868","runs":4,"sixes":0},{"balls_faced":12,"fours":0,"live_current_name":"non-striker","player_id":"54563","runs":5,"sixes":0}],"bowler":[{"conceded":28,"live_current_name":"current bowler","maidens":0,"overs":"8.0","player_id":93827,"wickets":2},{"conceded":39,"live_current_name":"previous bowler","maidens":0,"overs":"9.0","player_id":56870,"wickets":2}],"event_string":"4 runs","innings_number":2,"over_complete":1,"over_number":"41","required_string":"88 runs required from 54 balls, RR: 3.82, RRR: 9.77","runs":157,"team_id":28,"wickets":9},{"ball":[{"comms_id":"","dismissal":"","event":"2 runs","innings_number":"2","is_tweet":"","over_number":"40","overs_actual":"39.6","overs_unique":"39.06","players":"Taylor to Scholtz","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"no run","innings_number":"2","is_tweet":"","over_number":"40","overs_actual":"39.5","overs_unique":"39.05","players":"Taylor to Scholtz","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"1 run","innings_number":"2","is_tweet":"","over_number":"40","overs_actual":"39.4","overs_unique":"39.04","players":"Taylor to Lungameni","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"1 run","innings_number":"2","is_tweet":"","over_number":"40","overs_actual":"39.3","overs_unique":"39.03","players":"Taylor to Scholtz","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"no run","innings_number":"2","is_tweet":"","over_number":"40","overs_actual":"39.2","overs_unique":"39.02","players":"Taylor to Scholtz","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"no run","innings_number":"2","is_tweet":"","over_number":"40","overs_actual":"39.1","overs_unique":"39.01","players":"Taylor to Scholtz","speed_kph":"","speed_mph":"","text":""}],"batsman":[{"balls_faced":10,"fours":0,"live_current_name":"striker","player_id":"54563","runs":4,"sixes":0},{"balls_faced":1,"fours":0,"live_current_name":"non-striker","player_id":"65868","runs":1,"sixes":0}],"bowler":[{"conceded":39,"live_current_name":"current bowler","maidens":0,"overs":"9.0","player_id":56870,"wickets":2},{"conceded":24,"live_current_name":"previous bowler","maidens":0,"overs":"7.0","player_id":93827,"wickets":2}],"event_string":"4 runs","innings_number":2,"over_complete":1,"over_number":"40","required_string":"92 runs required from 60 balls, RR: 3.82, RRR: 9.2","runs":153,"team_id":28,"wickets":9},{"ball":[{"comms_id":"","dismissal":"R Trumpelmann c Holland b Kenjige 8 (14b 1x4 0x6) SR: 57.14","event":"OUT","innings_number":"2","is_tweet":"","over_number":"39","overs_actual":"38.6","overs_unique":"38.06","players":"Kenjige to Trumpelmann","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"FOUR","innings_number":"2","is_tweet":"","over_number":"39","overs_actual":"38.5","overs_unique":"38.05","players":"Kenjige to Trumpelmann","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"2 runs","innings_number":"2","is_tweet":"","over_number":"39","overs_actual":"38.4","overs_unique":"38.04","players":"Kenjige to Trumpelmann","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"1 run","innings_number":"2","is_tweet":"","over_number":"39","overs_actual":"38.3","overs_unique":"38.03","players":"Kenjige to Scholtz","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"no run","innings_number":"2","is_tweet":"","over_number":"39","overs_actual":"38.2","overs_unique":"38.02","players":"Kenjige to Scholtz","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"1 run","innings_number":"2","is_tweet":"","over_number":"39","overs_actual":"38.1","overs_unique":"38.01","players":"Kenjige to Trumpelmann","speed_kph":"","speed_mph":"","text":""}],"batsman":[{"balls_faced":5,"fours":0,"live_current_name":"non-striker","player_id":"54563","runs":1,"sixes":0}],"bowler":[{"conceded":24,"live_current_name":"current bowler","maidens":0,"overs":"7.0","player_id":93827,"wickets":2},{"conceded":35,"live_current_name":"previous bowler","maidens":0,"overs":"8.0","player_id":56870,"wickets":2}],"event_string":"8 runs","innings_number":2,"over_complete":1,"over_number":"39","required_string":"96 runs required from 11 overs, RR: 3.82, RRR: 8.72","runs":149,"team_id":28,"wickets":9},{"ball":[{"comms_id":"","dismissal":"","event":"no run","innings_number":"2","is_tweet":"","over_number":"38","overs_actual":"37.6","overs_unique":"37.06","players":"Taylor to Scholtz","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"no run","innings_number":"2","is_tweet":"","over_number":"38","overs_actual":"37.5","overs_unique":"37.05","players":"Taylor to Scholtz","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"no run","innings_number":"2","is_tweet":"","over_number":"38","overs_actual":"37.4","overs_unique":"37.04","players":"Taylor to Scholtz","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"ZE Green b Taylor 17 (37b 0x4 0x6) SR: 45.94","event":"OUT","innings_number":"2","is_tweet":"","over_number":"38","overs_actual":"37.3","overs_unique":"37.03","players":"Taylor to Green","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"1 leg bye","innings_number":"2","is_tweet":"","over_number":"38","overs_actual":"37.2","overs_unique":"37.02","players":"Taylor to Trumpelmann","speed_kph":"","speed_mph":"","text":""},{"comms_id":"","dismissal":"","event":"1 run","innings_number":"2","is_tweet":"","over_number":"38","overs_actual":"37.1","overs_unique":"37.01","players":"Taylor to Green","speed_kph":"","speed_mph":"","text":""}],"batsman":[{"balls_faced":3,"fours":0,"live_current_name":"striker","player_id":"54563","runs":0,"sixes":0},{"balls_faced":10,"fours":0,"live_current_name":"non-striker","player_id":"74479","runs":1,"sixes":0}],"bowler":[{"conceded":35,"live_current_name":"current bowler","maidens":0,"overs":"8.0","player_id":56870,"wickets":2},{"conceded":16,"live_current_name":"previous bowler","maidens":0,"overs":"6.0","player_id":93827,"wickets":1}],"event_string":"2 runs","innings_number":2,"over_complete":1,"over_number":"38","required_string":"104 runs required from 12 overs, RR: 3.71, RRR: 8.66","runs":141,"team_id":28,"wickets":8}],"description":"ICC Men's Cricket World Cup League 2, 110th Match: Namibia v United States of America at Windhoek, Nov 20, 2022","innings":[{"ball_limit":300,"balls":300,"batted":1,"batting_team_id":11,"bowling_team_id":28,"bpo":6,"byes":6,"event":0,"event_name":null,"extras":18,"innings_number":"1","innings_numth":"1st","lead":244,"legbyes":5,"live_current":0,"live_current_name":null,"minutes":null,"noballs":0,"old_penalty_or_bonus":0,"over_limit":"50.0","over_limit_run_rate":"4.88","over_split_limit":"0.0","overs":"50.0","overs_docked":0,"penalties":0,"penalties_field_end":0,"penalties_field_start":0,"run_rate":"4.88","runs":244,"target":0,"wickets":8,"wides":7},{"ball_limit":300,"balls":252,"batted":1,"batting_team_id":28,"bowling_team_id":11,"bpo":6,"byes":0,"event":0,"event_name":null,"extras":"7","innings_number":"2","innings_numth":"1st","lead":-85,"legbyes":"1","live_current":1,"live_current_name":"current innings","minutes":null,"noballs":0,"old_penalty_or_bonus":0,"over_limit":"50.0","over_limit_run_rate":"3.18","over_split_limit":"0.0","overs":"42.0","overs_docked":0,"penalties":0,"penalties_field_end":0,"penalties_field_start":0,"run_rate":"3.78","runs":"159","target":245,"wickets":"9","wides":"6"}],"live":{"batting":[{"balls_faced":"9","batting_averages":{"batting_average":"22.00","batting_strike_rate":"68.75","class_card":"ODI","high_score":" 12*","hundreds":"0","innings":"4","matches":"10","player_id":"65868","runs":"22"},"batting_averages_series":{"batting_average":"22.00","batting_strike_rate":"68.75","high_score":" 12*","hundreds":"0","innings":"4","matches":"10","player_id":"65868","runs":"22","series_type_name":"tournament"},"batting_position":11,"batting_pvp":{"balls":0,"bowler_player_id":49174,"runs":0},"batting_recent":{"balls":"9","over_span":5,"player_id":"65868","runs":"5"},"fours":"0","innings_number":2,"live_current":1,"live_current_name":"striker","minutes":"","player_id":"65868","runs":5,"sixes":"0","strike_rate":"55.55","team_id":28},{"balls_faced":"14","batting_averages":{"batting_average":"19.00","batting_strike_rate":"48.71","class_card":"ODI","high_score":" 30","hundreds":"0","innings":"14","matches":"24","player_id":"54563","runs":"95"},"batting_averages_series":{"batting_average":"19.00","batting_strike_rate":"48.71","high_score":" 30","hundreds":"0","innings":"14","matches":"23","player_id":"54563","runs":"95","series_type_name":"tournament"},"batting_position":10,"batting_pvp":{"balls":0,"bowler_player_id":49174,"runs":0},"batting_recent":{"balls":"14","over_span":5,"player_id":"54563","runs":"6"},"fours":"0","innings_number":2,"live_current":2,"live_current_name":"non-striker","minutes":"","player_id":"54563","runs":6,"sixes":"0","strike_rate":"42.85","team_id":28}],"bowling":[{"bowling_averages":{"bbi":" 4/30","bowling_average":"32.68","class_card":"ODI","economy_rate":"4.75","five_wickets":"0","matches":"28","overs":"171.5","player_id":"49174","wickets":"25"},"bowling_averages_series":{"bbi":" 2/11","bowling_average":"38.55","economy_rate":"4.85","five_wickets":"0","matches":"26","player_id":"49174","series_type_name":"tournament","wickets":"20"},"bowling_scoring":{"dots":"13","fours":"1","player_id":"49174","sixes":"0"},"bowling_spell":{},"conceded":16,"economy_rate":"4.00","innings_number":2,"live_current":1,"live_current_name":"current bowler","maidens":0,"noballs":0,"overs":"4.0","player_id":"49174","team_id":11,"wickets":1,"wides":1},{"bowling_averages":{"bbi":" 4/23","bowling_average":"26.41","class_card":"ODI","economy_rate":"4.23","five_wickets":"0","matches":"34","overs":"193.1","player_id":"56870","wickets":"31"},"bowling_averages_series":{"bbi":" 4/23","bowling_average":"26.36","economy_rate":"4.29","five_wickets":"0","matches":"31","player_id":"56870","series_type_name":"tournament","wickets":"30"},"bowling_scoring":{"dots":"35","fours":"3","player_id":"56870","sixes":"1"},"bowling_spell":{},"conceded":41,"economy_rate":"4.10","innings_number":2,"live_current":2,"live_current_name":"previous bowler","maidens":0,"noballs":0,"overs":"10.0","player_id":"56870","team_id":11,"wickets":2,"wides":0}],"break":"","field_restrict":[],"fow":[{"fow_order":9,"fow_overs":"41.6","fow_runs":159,"fow_wickets":9,"innings_number":2,"live_current":1,"live_current_name":"current partnership","opposition_id":11,"out_player":{},"partnership_overs":"3.0","partnership_rate":3.33,"partnership_runs":10,"partnership_wicket":10,"partnership_wicket_name":"10th","player":[{"fow_runs":"","partnership_runs":"","player_id":""},{"fow_runs":"","partnership_runs":"","player_id":""}],"player_id":null,"team_id":28},{"fow_order":8,"fow_overs":"38.6","fow_runs":149,"fow_wickets":9,"innings_number":2,"live_current":2,"live_current_name":"last wicket","opposition_id":11,"out_player":{"balls_faced":14,"dismissal_string":"c Holland b Kenjige","fours":1,"minutes":"","player_id":74479,"runs":8,"sixes":0,"strike_rate":"57.14"},"partnership_overs":"1.3","partnership_rate":5.33,"partnership_runs":8,"partnership_wicket":9,"partnership_wicket_name":"9th","player":[{"fow_runs":"","partnership_runs":"","player_id":""},{"fow_runs":"","partnership_runs":"","player_id":""}],"player_id":74479,"team_id":28}],"innings":{"ball_limit":300,"balls":252,"batted":1,"batting_team_id":28,"bowling_team_id":11,"bpo":6,"event":"0","event_name":null,"innings_number":"2","lead":-85,"live_current":1,"live_current_name":"current innings","over_limit":"50.0","over_limit_run_rate":3.18,"over_split_limit":"0.0","overs":"42.0","remaining_balls":"48","remaining_overs":"8.0","remaining_wickets":"1","required_run_rate":10.75,"run_rate":3.78,"runs":159,"target":245,"team_id":28,"wickets":9},"innings_recent":[{"balls":"30","innings_number":2,"over_span":5,"run_rate":4,"runs":"20","wickets":"2"}],"recent_overs":[[{"ball":1,"ball_number":1,"extras":"","over_number":39},{"ball":"•","ball_number":2,"extras":"","over_number":"39"},{"ball":1,"ball_number":3,"extras":"","over_number":"39"},{"ball":2,"ball_number":4,"extras":"","over_number":"39"},{"ball":4,"ball_number":5,"extras":"","over_number":"39"},{"ball":"W","ball_number":6,"extras":"","over_number":"39"}],[{"ball":"•","ball_number":1,"extras":"","over_number":"40"},{"ball":"•","ball_number":2,"extras":"","over_number":"40"},{"ball":1,"ball_number":3,"extras":"","over_number":"40"},{"ball":1,"ball_number":4,"extras":"","over_number":"40"},{"ball":"•","ball_number":5,"extras":"","over_number":"40"},{"ball":2,"ball_number":6,"extras":"","over_number":"40"}],[{"ball":1,"ball_number":1,"extras":"","over_number":"41"},{"ball":"•","ball_number":2,"extras":"","over_number":"41"},{"ball":1,"ball_number":3,"extras":"","over_number":"41"},{"ball":2,"ball_number":4,"extras":"","over_number":"41"},{"ball":"•","ball_number":5,"extras":"","over_number":"41"},{"ball":"•","ball_number":6,"extras":"","over_number":"41"}],[{"ball":1,"ball_number":1,"extras":"","over_number":"42"},{"ball":"•","ball_number":2,"extras":"","over_number":"42"},{"ball":"•","ball_number":3,"extras":"","over_number":"42"},{"ball":"•","ball_number":4,"extras":"","over_number":"42"},{"ball":1,"ball_number":5,"extras":"","over_number":"42"},{"ball":"•","ball_number":6,"extras":"","over_number":"42"}]],"review":[],"status":"Namibia require another 86 runs with 1 wicket and 48 balls remaining"},"live_clipper":{},"live_video":{},"match":{"actual_days":"1","adjusted":"0","amount":"0","amount_balls":"0","amount_name":"","amount_type":"0","away_team_id":"11","ballbyball_source":"","batting_first_team_id":"11","bitly_hash":"3gcxQ64","bpo":"0","cancelled_match":"N","cms_match_title":"110th Match","commentary_source":"dougie","continent_id":"1","continent_name":"Africa","country_abbreviation":"NAM","country_filename":"NAMIB","country_id":"28","country_name":"Namibia","current_summary":"Namibia 159/9 (42.0 ov, T Lungameni 5*, BM Scholtz 6*, NK Patel 1/16)","current_summary_abbreviation":"NAM 159/9 (42.0 ov, T Lungameni 5*, BM Scholtz 6*, NK Patel 1/16)","date":"Nov 20, 2022","date_string":"20 November 2022","days_extended":"0","end_date":"Nov 20, 2022","end_date_raw":"2022-11-20","floodlit":"1","floodlit_name":"day match","followon":"0","general_class_card":"List A","general_class_id":"5","general_class_name":"List A matches","general_number":"","general_valid":"1","gmt_difference":"+0200","ground_id":"1695","ground_latitude":"-22.568577","ground_longitude":"17.089266","ground_name":"Wanderers Cricket Ground, Windhoek","ground_object_id":"58678","ground_small_name":"Windhoek","hawkeye_source":"","head2head_source":"dougie","home_team_id":"28","hours_string":"","international_class_card":"ODI","international_class_id":"2","international_class_name":"One-Day Internationals","international_number":"004479","international_valid":"1","legacy_url":"/db/ARCHIVE/2022-23/OTHERS/ICC-M-CWC-LGE2/SCORECARDS/NAMIB_USA_ICC-M-CWC-LGE2_20NOV2022","live_commentator":"","live_companion":"N","live_day_number":"1","live_innings_number":"2","live_match":"Y","live_note":"","live_overs_remaining":"0.0","live_overs_unique":"42.00","live_scorer":"","live_session_number":"0","live_state":"","match_clock":"","match_day_countdown":"0","match_minute_countdown":"","match_path":"","match_status":"current","neutral_match":"0","next_datetime_gmt":"2022-11-20 07:30:00","next_datetime_local":"2022-11-20 09:30:00","player_rating":"N","present_date_gmt":"2022-11-20","present_date_local":"2022-11-20","present_datetime_gmt":"2022-11-20 14:56:00","present_datetime_local":"2022-11-20 16:56:00","present_time_gmt":"14:56:00","present_time_local":"16:56:00","rain_rule":"","rain_rule_name":"","rating_promo":"","reduced":"0","reserve_days_used":"0","result":"0","result_name":"","result_short_name":"","schedule_note":"","scheduled_days":"1","scheduled_innings":"1","scheduled_overs":"50","scorecard_source":"dougie","scribble_id":"0","season":"2022/23","site_id":"1","site_name":"Global","start_date":"Nov 20, 2022","start_date_gmt_offset":"0","start_date_raw":"2022-11-20","start_datetime_gmt":"2022-11-20 07:30:00","start_datetime_gmt_raw":"2022-11-20 07:30:00","start_datetime_local":"2022-11-20 09:30:00","start_time_gmt":"07:30:00","start_time_local":"09:30:00","sub_class_id":"0","team1_abbreviation":"NAM","team1_class_id":"2","team1_country_id":"28","team1_filename":"NAMIB","team1_id":"28","team1_logo_alt_id":"logo","team1_logo_espncdn":"Y","team1_logo_object_id":"1241607","team1_name":"Namibia","team1_object_id":"28","team1_short_name":"Namibia","team2_abbreviation":"USA","team2_class_id":"2","team2_country_id":"11","team2_filename":"USA","team2_id":"11","team2_logo_alt_id":"logo","team2_logo_espncdn":"Y","team2_logo_object_id":"1241592","team2_name":"United States of America","team2_object_id":"11","team2_short_name":"U.S.A.","tiebreaker_name":"","tiebreaker_team_id":"0","tiebreaker_type":"0","time_zone":"Africa/Maputo","toss_choice_team_id":"0","toss_decision":"2","toss_decision_name":"field","toss_winner_team_id":"28","town_aka":"","town_area":"Namibia","town_id":"783","town_name":"Windhoek","tz_short_name":"CAT","url_component":"ci","watch_espn_id":"0","weather_location_code":"WAXX0004","winner_team_id":"0"},"match_card":"
  • BattingRB46
    L Louwrenslbw254530
    D la Cockcaught81610
    M van Lingencaught233140
    MG Erasmuscaught275020
    JN Loftie-Eatoncaught1300
    JN Frylinckcaught101800
    ZE Greenbowled173700
    JJ Smitlbw221522
    R Trumpelmanncaught81410
    BM Scholtznot out61400
    T Lungameninot out5900
    Extras(lb 1, w 6)7
    Total(9 wkts; 42 ovs)159
  • BowlingOMRWEcon
    SN Netravalkar621212.00
    IG Holland712723.85(3w)
    Jasdeep Singh703414.85(1w)
    SR Taylor1004124.10
    NP Kenjige802823.50(1w)
    NK Patel401614.00(1w)
  • ","middle_column":"","official":[{"age_days":233,"age_years":36,"alpha_name":"JELE,BP","batting_hand":"unknown hand","bowling_hand":"unknown arm","bowling_pacespin":"mixture/unknown","card_long":"BP Jele","card_qualifier":"","card_short":"BP Jele","dob":"1986-04-01","known_as":"Bongani Jele","mobile_name":"Jele","object_id":432064,"player_id":"61424","player_type":2,"player_type_name":"umpire","popular_name":"Jele","portrait_alt_id":"1","portrait_object_id":906645,"status_id":3,"team_abbreviation":"SA","team_id":3,"team_name":"South Africa","team_short_name":"South Africa"},{"age_days":212,"age_years":54,"alpha_name":"SCHUMACHER,C","batting_hand":"unknown hand","bowling_hand":"unknown arm","bowling_pacespin":"mixture/unknown","card_long":"C Schumacher","card_qualifier":"","card_short":"C Schumacher","dob":"1968-04-22","known_as":"Claus Schumacher","mobile_name":"Schumacher","object_id":1095719,"player_id":"97208","player_type":2,"player_type_name":"umpire","popular_name":"","portrait_alt_id":"","portrait_object_id":0,"status_id":3,"team_abbreviation":null,"team_id":0,"team_name":null,"team_short_name":null},{"age_days":322,"age_years":49,"alpha_name":"DUBE,ET","batting_hand":"unknown hand","bowling_hand":"unknown arm","bowling_pacespin":"mixture/unknown","card_long":"ET Dube","card_qualifier":"","card_short":"ET Dube","dob":"1973-01-02","known_as":"Emmanuel Dube","mobile_name":"Dube","object_id":252662,"player_id":"49618","player_type":4,"player_type_name":"referee","popular_name":"Dube","portrait_alt_id":"1","portrait_object_id":1260525,"status_id":3,"team_abbreviation":"ZIM","team_id":9,"team_name":"Zimbabwe","team_short_name":"Zimbabwe"},{"age_days":270,"age_years":35,"alpha_name":"THORBURN,C","batting_hand":"unknown hand","bowling_hand":"unknown arm","bowling_pacespin":"mixture/unknown","card_long":"C Thorburn","card_qualifier":"","card_short":"C Thorburn","dob":"1987-02-23","known_as":"Claude Thorburn","mobile_name":"Thorburn","object_id":319435,"player_id":"53713","player_type":7,"player_type_name":"reserve umpire","popular_name":"Thorburn","portrait_alt_id":"1","portrait_object_id":1135283,"status_id":3,"team_abbreviation":null,"team_id":0,"team_name":null,"team_short_name":null}],"other_scores":{"domestic":[{"object_id":1330765,"result":"Match drawn (Col CC won on 1st innings)","start_time":"10:00 local | 04:30 GMT | 23:30 EST -1d | 22:30 CST -1d | 20:30 PST -1d","team1_desc":" 558 & 145/4 (15.5 ov)","team1_name":"Tamil","team2_desc":" 669","team2_name":"CCC","url":"/ci/engine/match/1330765.html"},{"object_id":1322408,"start_time":"10:30 local | 00:00 GMT | 19:00 EST -1d | 18:00 CST -1d | 16:00 PST -1d","team1_desc":" 107/6 (52.5 ov)","team1_name":"SOA","team2_desc":"","team2_name":"QLD","url":"/ci/engine/match/1322408.html"},{"object_id":1344561,"team1_desc":" 242/4","team1_name":"SOU-W","team2_desc":" 124 (36.5/50 ov)","team2_name":"NOR-W","url":"/ci/engine/match/1344561.html"}],"international":[{"object_id":1341970,"start_time":"09:30 local | 07:30 GMT | 02:30 EST | 01:30 CST | 23:30 PST -1d","team1_desc":" 244/8","team1_name":"USA","team2_desc":" 159/9 (42/50 ov)","team2_name":"NAM","url":"/ci/engine/match/1341970.html"}],"others":[]},"score_source":"0","series":[{"class_id":2,"class_name":"One-Day Internationals","content_id":"13216","core_recreation_id":19439,"date":"Aug 2019 - Dec 2022","end_date":"9 Dec 2022","end_date_raw":"2022-12-09","final_type_name":"preliminary matches","group_title":"","major_trophy":0,"match_number":110,"match_title":"110th Match","match_type_name":null,"multiformat_pointstable":"N","number_of_hosts":7,"number_of_matches":1,"number_of_teams":7,"object_id":1196667,"points":null,"primary_series":"N","replayed_date":null,"schedule_note":"","score_module_position":0,"season":"2019-2023","series_abbreviation":null,"series_category_id":1,"series_category_name":"competition","series_filename":null,"series_lead_abandoned":0,"series_lead_cancelled":0,"series_lead_how_won_name":null,"series_lead_lost":0,"series_lead_result_name":null,"series_lead_team_name":null,"series_lead_total":0,"series_lead_type_name":null,"series_lead_won":0,"series_long_description":"","series_name":"ICC Men's Cricket World Cup League 2","series_short_name":"World Cup League 2","series_status":"current","series_type_id":3,"series_type_name":"tournament","short_alternate_name":"CWC League 2","site_id":1,"slug":"icc-mcwc-league-2","start_date":"14 Aug 2019","start_date_raw":"2019-08-14","team1_points":null,"team2_points":null,"teams":[{"host_team":1,"object_id":28,"primary_team":1,"series_id":"13216","series_result_name":null,"site_id":36,"team_abbreviation":"NAM","team_filename":"NAMIB","team_id":28,"team_name":"Namibia","team_short_name":"Namibia","url_component":"other"},{"host_team":1,"object_id":33,"primary_team":1,"series_id":"13216","series_result_name":null,"site_id":1901,"team_abbreviation":"NEPAL","team_filename":"NEP","team_id":32,"team_name":"Nepal","team_short_name":"Nepal","url_component":"nepal"},{"host_team":1,"object_id":37,"primary_team":1,"series_id":"13216","series_result_name":null,"site_id":2487,"team_abbreviation":"OMA","team_filename":"OMA","team_id":37,"team_name":"Oman","team_short_name":"Oman","url_component":"oman"},{"host_team":1,"object_id":20,"primary_team":1,"series_id":"13216","series_result_name":null,"site_id":1945,"team_abbreviation":"PNG","team_filename":"PNG","team_id":20,"team_name":"Papua New Guinea","team_short_name":"P.N.G.","url_component":"png"},{"host_team":1,"object_id":30,"primary_team":1,"series_id":"13216","series_result_name":null,"site_id":113,"team_abbreviation":"SCOT","team_filename":"SCOT","team_id":30,"team_name":"Scotland","team_short_name":"Scotland","url_component":"scotland"},{"host_team":1,"object_id":27,"primary_team":1,"series_id":"13216","series_result_name":null,"site_id":1947,"team_abbreviation":"UAE","team_filename":"UAE","team_id":27,"team_name":"United Arab Emirates","team_short_name":"U.A.E.","url_component":"uae"},{"host_team":1,"object_id":11,"primary_team":1,"series_id":"13216","series_result_name":null,"site_id":34,"team_abbreviation":"USA","team_filename":"USA","team_id":11,"team_name":"United States of America","team_short_name":"U.S.A.","url_component":"usa"}],"tiebreaker_id":1,"tiebreaker_name":"net run-rate","trophy_abbreviation":"MCWC-L2","trophy_class_id":0,"trophy_country_id":0,"trophy_id":806,"trophy_name":"ICC Men's Cricket World Cup League 2","trophy_short_name":"ICC MCWC League 2","url_component":"ci"},{"class_id":0,"class_name":null,"content_id":"15073","core_recreation_id":21114,"date":"Nov 2022","end_date":"26 Nov 2022","end_date_raw":"2022-11-26","final_type_name":null,"group_title":"","major_trophy":null,"match_number":null,"match_title":"110th Match","match_type_name":null,"multiformat_pointstable":"N","number_of_hosts":null,"number_of_matches":1,"number_of_teams":null,"object_id":1341964,"points":0,"primary_series":"N","replayed_date":null,"schedule_note":"","score_module_position":0,"season":"2022/23","series_abbreviation":null,"series_category_id":3,"series_category_name":"tour","series_filename":null,"series_lead_abandoned":0,"series_lead_cancelled":0,"series_lead_how_won_name":null,"series_lead_lost":0,"series_lead_result_name":null,"series_lead_team_name":null,"series_lead_total":0,"series_lead_type_name":null,"series_lead_won":0,"series_long_description":"","series_name":"United States of America tour of Namibia","series_short_name":"United States of America in Namibia","series_status":"current","series_type_id":8,"series_type_name":"minor tour","short_alternate_name":"","site_id":1,"slug":"united-states-of-america-in-namibia-2022-23","start_date":"20 Nov 2022","start_date_raw":"2022-11-20","team1_points":"0.000","team2_points":"0.000","teams":[{"host_team":1,"object_id":28,"primary_team":0,"series_id":"15073","series_result_name":null,"site_id":36,"team_abbreviation":"NAM","team_filename":"NAMIB","team_id":28,"team_name":"Namibia","team_short_name":"Namibia","url_component":"other"},{"host_team":0,"object_id":11,"primary_team":1,"series_id":"15073","series_result_name":null,"site_id":34,"team_abbreviation":"USA","team_filename":"USA","team_id":11,"team_name":"United States of America","team_short_name":"U.S.A.","url_component":"usa"}],"tiebreaker_id":0,"tiebreaker_name":null,"trophy_abbreviation":null,"trophy_class_id":null,"trophy_country_id":null,"trophy_id":0,"trophy_name":null,"trophy_short_name":null,"url_component":"ci"}],"substitute":[{"age_days":238,"age_years":26,"alpha_name":"BIRKENSTOCK,K","batting_hand":"left-hand batter","batting_style":"lhb","batting_style_long":"left-hand bat","bowling_hand":"right-arm bowler","bowling_pacespin":"pace bowler","bowling_style":"rfm","bowling_style_long":"right-arm fast-medium ","captain":0,"card_long":"K Birkenstock","card_qualifier":"","card_short":"K Birkenstock","dob":"1996-03-27","full_sub":0,"full_sub_innings":0,"full_sub_name":null,"full_sub_overs":"0.0","full_sub_player_id":0,"keeper":0,"known_as":"Karl Birkenstock","mobile_name":"","object_id":1057456,"player_id":"94753","player_primary_role":"middle-order batter","player_style_id":3,"player_type":5,"player_type_name":"sub fielder","popular_name":"","portrait_alt_id":"4","portrait_object_id":1340686,"status_id":3,"team_abbreviation":"NAM","team_id":"28","team_name":"Namibia","team_short_name":"Namibia"},{"age_days":196,"age_years":22,"alpha_name":"SHIKONGO,B","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"right-arm bowler","bowling_pacespin":"pace bowler","bowling_style":"rmf","bowling_style_long":"right-arm medium-fast ","captain":0,"card_long":"B Shikongo","card_qualifier":"","card_short":"B Shikongo","dob":"2000-05-08","full_sub":0,"full_sub_innings":0,"full_sub_name":null,"full_sub_overs":"0.0","full_sub_player_id":0,"keeper":0,"known_as":"Ben Shikongo","mobile_name":"Shikongo","object_id":1069820,"player_id":"95279","player_primary_role":"bowler","player_style_id":4,"player_type":5,"player_type_name":"sub fielder","popular_name":"Shikongo","portrait_alt_id":"4","portrait_object_id":1286761,"status_id":3,"team_abbreviation":"NAM","team_id":"28","team_name":"Namibia","team_short_name":"Namibia"},{"age_days":211,"age_years":32,"alpha_name":"YAFRANCE,HN","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"right-arm bowler","bowling_pacespin":"spin bowler","bowling_style":"ob","bowling_style_long":"right-arm offbreak ","captain":0,"card_long":"HN Ya France","card_qualifier":"","card_short":"HN Ya France","dob":"1990-04-23","full_sub":0,"full_sub_innings":0,"full_sub_name":null,"full_sub_overs":"0.0","full_sub_player_id":0,"keeper":0,"known_as":"Pikky Ya France","mobile_name":"Ya France","object_id":308410,"player_id":"53164","player_primary_role":"middle-order batter","player_style_id":3,"player_type":5,"player_type_name":"sub fielder","popular_name":"","portrait_alt_id":"1","portrait_object_id":690539,"status_id":3,"team_abbreviation":"NAM","team_id":"28","team_name":"Namibia","team_short_name":"Namibia"},{"age_days":272,"age_years":21,"alpha_name":"GANESH,S","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"unknown arm","bowling_pacespin":"mixture/unknown","bowling_style":null,"bowling_style_long":null,"captain":0,"card_long":"S Ganesh","card_qualifier":"","card_short":"S Ganesh","dob":"2001-02-21","full_sub":0,"full_sub_innings":0,"full_sub_name":null,"full_sub_overs":"0.0","full_sub_player_id":0,"keeper":0,"known_as":"Saideep Ganesh","mobile_name":"Ganesh","object_id":1345498,"player_id":"114045","player_primary_role":null,"player_style_id":null,"player_type":5,"player_type_name":"sub fielder","popular_name":"Ganesh","portrait_alt_id":"","portrait_object_id":0,"status_id":3,"team_abbreviation":"USA","team_id":"11","team_name":"United States of America","team_short_name":"U.S.A."},{"age_days":21,"age_years":30,"alpha_name":"STEVENSON,CAH","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"right-arm bowler","bowling_pacespin":"pace bowler","bowling_style":"rfm","bowling_style_long":"right-arm fast-medium ","captain":0,"card_long":"CAH Stevenson","card_qualifier":"","card_short":"CAH Stevenson","dob":"1992-10-30","full_sub":0,"full_sub_innings":0,"full_sub_name":null,"full_sub_overs":"0.0","full_sub_player_id":0,"keeper":0,"known_as":"Cameron Stevenson","mobile_name":"Stevenson","object_id":953793,"player_id":"88923","player_primary_role":null,"player_style_id":null,"player_type":5,"player_type_name":"sub fielder","popular_name":"","portrait_alt_id":"1","portrait_object_id":1206193,"status_id":3,"team_abbreviation":"USA","team_id":"11","team_name":"United States of America","team_short_name":"U.S.A."},{"age_days":99,"age_years":34,"alpha_name":"USMAN_RAFIQ","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"right-arm bowler","bowling_pacespin":"spin bowler","bowling_style":"ob","bowling_style_long":"right-arm offbreak ","captain":0,"card_long":"Usman Rafiq","card_qualifier":"","card_short":"Usman Rafiq","dob":"1988-08-13","full_sub":0,"full_sub_innings":0,"full_sub_name":null,"full_sub_overs":"0.0","full_sub_player_id":0,"keeper":0,"known_as":"Usman Rafiq","mobile_name":"","object_id":772469,"player_id":"77575","player_primary_role":null,"player_style_id":null,"player_type":5,"player_type_name":"sub fielder","popular_name":"","portrait_alt_id":"1","portrait_object_id":786357,"status_id":3,"team_abbreviation":"USA","team_id":"11","team_name":"United States of America","team_short_name":"U.S.A."}],"team":[{"batsmen_in_side":11,"content_id":28,"country_id":28,"fielders_in_side":11,"logo_alt_id":"logo","logo_espncdn":"Y","logo_height":500,"logo_image_height":500,"logo_image_path":"/db/PICTURES/CMS/313100/313148.logo.png","logo_image_width":500,"logo_object_id":1241607,"logo_path":"/db/PICTURES/CMS/313100/313148.logo.png","logo_width":500,"object_id":28,"player":[{"age_days":210,"age_years":23,"alpha_name":"LOUWRENS,L","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"unknown arm","bowling_pacespin":"mixture/unknown","bowling_style":null,"bowling_style_long":null,"captain":0,"card_long":"L Louwrens","card_qualifier":"","card_short":"Louwrens","dob":"1999-04-24","keeper":0,"known_as":"Lo-handre Louwrens","mobile_name":"Louwrens","object_id":827023,"player_id":"80829","player_primary_role":"wicketkeeper batter","player_style_id":7,"player_type":1,"player_type_name":"player","popular_name":"Louwrens","portrait_alt_id":"4","portrait_object_id":1340688,"status_id":3},{"age_days":270,"age_years":19,"alpha_name":"LACOCK,D","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"right-arm bowler","bowling_pacespin":"spin bowler","bowling_style":"lb","bowling_style_long":"legbreak ","captain":0,"card_long":"D la Cock","card_qualifier":"","card_short":"la Cock","dob":"2003-02-23","keeper":0,"known_as":"Divan la Cock","mobile_name":"la Cock","object_id":1178065,"player_id":"104954","player_primary_role":"opening batter","player_style_id":1,"player_type":1,"player_type_name":"player","popular_name":"la Cock","portrait_alt_id":"4","portrait_object_id":1340678,"status_id":3},{"age_days":27,"age_years":25,"alpha_name":"VANLINGEN,M","batting_hand":"left-hand batter","batting_style":"lhb","batting_style_long":"left-hand bat","bowling_hand":"left-arm bowler","bowling_pacespin":"pace bowler","bowling_style":"lm","bowling_style_long":"left-arm medium ","captain":0,"card_long":"M van Lingen","card_qualifier":"","card_short":"van Lingen","dob":"1997-10-24","keeper":0,"known_as":"Michael van Lingen","mobile_name":"van Lingen","object_id":833777,"player_id":"80905","player_primary_role":"bowling allrounder","player_style_id":11,"player_type":1,"player_type_name":"player","popular_name":"","portrait_alt_id":"4","portrait_object_id":1340683,"status_id":3},{"age_days":223,"age_years":27,"alpha_name":"ERASMUS,MG","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"right-arm bowler","bowling_pacespin":"spin bowler","bowling_style":"ob","bowling_style_long":"right-arm offbreak ","captain":1,"card_long":"MG Erasmus","card_qualifier":"","card_short":"Erasmus","dob":"1995-04-11","keeper":0,"known_as":"Gerhard Erasmus","mobile_name":"Erasmus","object_id":519070,"player_id":"65478","player_primary_role":"allrounder","player_style_id":5,"player_type":1,"player_type_name":"player","popular_name":"Erasmus","portrait_alt_id":"1","portrait_object_id":721483,"status_id":3},{"age_days":250,"age_years":21,"alpha_name":"LOFTIE-EATON,JN","batting_hand":"left-hand batter","batting_style":"lhb","batting_style_long":"left-hand bat","bowling_hand":"right-arm bowler","bowling_pacespin":"mixture/unknown","bowling_style":"rm/lb","bowling_style_long":"right-arm medium /legbreak ","captain":0,"card_long":"JN Loftie-Eaton","card_qualifier":"","card_short":"Loftie-Eaton","dob":"2001-03-15","keeper":0,"known_as":"Jan Nicol Loftie-Eaton","mobile_name":"","object_id":1071473,"player_id":"95708","player_primary_role":"batter","player_style_id":8,"player_type":1,"player_type_name":"player","popular_name":"","portrait_alt_id":"4","portrait_object_id":1340687,"status_id":3},{"age_days":228,"age_years":28,"alpha_name":"FRYLINCK,JN","batting_hand":"left-hand batter","batting_style":"lhb","batting_style_long":"left-hand bat","bowling_hand":"left-arm bowler","bowling_pacespin":"pace bowler","bowling_style":"lfm","bowling_style_long":"left-arm fast-medium ","captain":0,"card_long":"JN Frylinck","card_qualifier":"","card_short":"Frylinck","dob":"1994-04-06","keeper":0,"known_as":"Jan Frylinck","mobile_name":"Frylinck","object_id":482478,"player_id":"63683","player_primary_role":"allrounder","player_style_id":5,"player_type":1,"player_type_name":"player","popular_name":"Frylinck","portrait_alt_id":"4","portrait_object_id":1340682,"status_id":3},{"age_days":40,"age_years":26,"alpha_name":"GREEN,ZE","batting_hand":"left-hand batter","batting_style":"lhb","batting_style_long":"left-hand bat","bowling_hand":"unknown arm","bowling_pacespin":"mixture/unknown","bowling_style":null,"bowling_style_long":null,"captain":0,"card_long":"ZE Green","card_qualifier":"","card_short":"Green","dob":"1996-10-11","keeper":1,"known_as":"Zane Green","mobile_name":"Green","object_id":596664,"player_id":"70085","player_primary_role":"wicketkeeper batter","player_style_id":7,"player_type":1,"player_type_name":"player","popular_name":"Green","portrait_alt_id":"4","portrait_object_id":1340690,"status_id":3},{"age_days":10,"age_years":27,"alpha_name":"SMIT,JJ","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"left-arm bowler","bowling_pacespin":"pace bowler","bowling_style":"lmf","bowling_style_long":"left-arm medium-fast ","captain":0,"card_long":"JJ Smit","card_qualifier":"","card_short":"Smit","dob":"1995-11-10","keeper":0,"known_as":"JJ Smit","mobile_name":"Smit","object_id":553821,"player_id":"67403","player_primary_role":"bowling allrounder","player_style_id":11,"player_type":1,"player_type_name":"player","popular_name":"Smit","portrait_alt_id":"1","portrait_object_id":721499,"status_id":3},{"age_days":292,"age_years":24,"alpha_name":"TRUMPELMANN,R","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"left-arm bowler","bowling_pacespin":"pace bowler","bowling_style":"lf","bowling_style_long":"left-arm fast ","captain":0,"card_long":"R Trumpelmann","card_qualifier":"","card_short":"Trumpelmann","dob":"1998-02-01","keeper":0,"known_as":"Ruben Trumpelmann","mobile_name":"Trumpelmann","object_id":698317,"player_id":"74479","player_primary_role":"bowler","player_style_id":4,"player_type":1,"player_type_name":"player","popular_name":"Trumpelmann","portrait_alt_id":"4","portrait_object_id":1340684,"status_id":3},{"age_days":48,"age_years":32,"alpha_name":"SCHOLTZ,BM","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"left-arm bowler","bowling_pacespin":"spin bowler","bowling_style":"sla","bowling_style_long":"slow left-arm orthodox ","captain":0,"card_long":"BM Scholtz","card_qualifier":"","card_short":"Scholtz","dob":"1990-10-03","keeper":0,"known_as":"Bernard Scholtz","mobile_name":"Scholtz","object_id":330223,"player_id":"54563","player_primary_role":"bowler","player_style_id":4,"player_type":1,"player_type_name":"player","popular_name":"Scholtz","portrait_alt_id":"1","portrait_object_id":694977,"status_id":3},{"age_days":217,"age_years":30,"alpha_name":"LUNGAMENI,T","batting_hand":"left-hand batter","batting_style":"lhb","batting_style_long":"left-hand bat","bowling_hand":"left-arm bowler","bowling_pacespin":"pace bowler","bowling_style":"lm","bowling_style_long":"left-arm medium ","captain":0,"card_long":"T Lungameni","card_qualifier":"","card_short":"Lungameni","dob":"1992-04-17","keeper":0,"known_as":"Tangeni Lungameni","mobile_name":"Lungameni","object_id":524075,"player_id":"65868","player_primary_role":"bowler","player_style_id":4,"player_type":1,"player_type_name":"player","popular_name":"","portrait_alt_id":"4","portrait_object_id":1340680,"status_id":3}],"players_in_side":11,"site_id":36,"team_abbreviation":"NAM","team_filename":"NAMIB","team_general_name":"Namibia","team_id":"28","team_name":"Namibia","team_short_name":"Namibia","url_component":"other"},{"batsmen_in_side":11,"content_id":11,"country_id":11,"fielders_in_side":11,"logo_alt_id":"logo","logo_espncdn":"Y","logo_height":500,"logo_image_height":500,"logo_image_path":"/db/PICTURES/CMS/313100/313133.logo.png","logo_image_width":500,"logo_object_id":1241592,"logo_path":"/db/PICTURES/CMS/313100/313133.logo.png","logo_width":500,"object_id":11,"player":[{"age_days":11,"age_years":29,"alpha_name":"TAYLOR,SR","batting_hand":"left-hand batter","batting_style":"lhb","batting_style_long":"left-hand bat","bowling_hand":"right-arm bowler","bowling_pacespin":"spin bowler","bowling_style":"ob","bowling_style_long":"right-arm offbreak ","captain":0,"card_long":"SR Taylor","card_qualifier":"","card_short":"Taylor","dob":"1993-11-09","keeper":0,"known_as":"Steven Taylor","mobile_name":"Taylor","object_id":348133,"player_id":"56870","player_primary_role":"opening batter","player_style_id":1,"player_type":1,"player_type_name":"player","popular_name":"Taylor","portrait_alt_id":"1","portrait_object_id":694949,"status_id":3},{"age_days":319,"age_years":33,"alpha_name":"MODANI,SJ","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"right-arm bowler","bowling_pacespin":"spin bowler","bowling_style":"ob","bowling_style_long":"right-arm offbreak ","captain":0,"card_long":"SJ Modani","card_qualifier":"","card_short":"Modani","dob":"1989-01-05","keeper":0,"known_as":"Sushant Modani","mobile_name":"Modani","object_id":1276393,"player_id":"110010","player_primary_role":null,"player_style_id":null,"player_type":1,"player_type_name":"player","popular_name":"Modani","portrait_alt_id":"4","portrait_object_id":1315459,"status_id":3},{"age_days":203,"age_years":29,"alpha_name":"PATEL,MD","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"unknown arm","bowling_pacespin":"mixture/unknown","bowling_style":null,"bowling_style_long":null,"captain":0,"card_long":"MD Patel","card_qualifier":"","card_short":"MD Patel","dob":"1993-05-01","keeper":0,"known_as":"Monank Patel","mobile_name":"Patel","object_id":1159641,"player_id":"103569","player_primary_role":"top-order batter","player_style_id":2,"player_type":1,"player_type_name":"player","popular_name":"Patel","portrait_alt_id":"4","portrait_object_id":1315448,"status_id":3},{"age_days":32,"age_years":28,"alpha_name":"AARON_JONES","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"right-arm bowler","bowling_pacespin":"spin bowler","bowling_style":"lbg","bowling_style_long":"legbreak googly ","captain":0,"card_long":"Aaron Jones","card_qualifier":"","card_short":"Aaron Jones","dob":"1994-10-19","keeper":0,"known_as":"Aaron Jones","mobile_name":"","object_id":957645,"player_id":"88991","player_primary_role":"top-order batter","player_style_id":2,"player_type":1,"player_type_name":"player","popular_name":"","portrait_alt_id":"1","portrait_object_id":1178565,"status_id":3},{"age_days":48,"age_years":35,"alpha_name":"SINGH,G","batting_hand":"left-hand batter","batting_style":"lhb","batting_style_long":"left-hand bat","bowling_hand":"left-arm bowler","bowling_pacespin":"pace bowler","bowling_style":"lm","bowling_style_long":"left-arm medium ","captain":0,"card_long":"G Singh","card_qualifier":"","card_short":"Singh","dob":"1987-10-03","keeper":0,"known_as":"Gajanand Singh","mobile_name":"Singh","object_id":230551,"player_id":"49032","player_primary_role":null,"player_style_id":null,"player_type":1,"player_type_name":"player","popular_name":"Singh","portrait_alt_id":"4","portrait_object_id":1315409,"status_id":3},{"age_days":48,"age_years":32,"alpha_name":"HOLLAND,IG","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"right-arm bowler","bowling_pacespin":"pace bowler","bowling_style":"rm","bowling_style_long":"right-arm medium ","captain":0,"card_long":"IG Holland","card_qualifier":"","card_short":"Holland","dob":"1990-10-03","keeper":0,"known_as":"Ian Holland","mobile_name":"Holland","object_id":334340,"player_id":"55324","player_primary_role":"allrounder","player_style_id":5,"player_type":1,"player_type_name":"player","popular_name":"Holland","portrait_alt_id":"1","portrait_object_id":1206195,"status_id":3},{"age_days":331,"age_years":27,"alpha_name":"SHAYAN_JAHANGIR","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"right-arm bowler","bowling_pacespin":"pace bowler","bowling_style":"rmf","bowling_style_long":"right-arm medium-fast ","captain":0,"card_long":"Shayan Jahangir","card_qualifier":"","card_short":"Shayan Jahangir","dob":"1994-12-24","keeper":1,"known_as":"Shayan Jahangir","mobile_name":"Shayan","object_id":647771,"player_id":"71605","player_primary_role":"batter","player_style_id":8,"player_type":1,"player_type_name":"player","popular_name":"Shayan","portrait_alt_id":"","portrait_object_id":0,"status_id":3},{"age_days":214,"age_years":34,"alpha_name":"PATEL,NK","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"left-arm bowler","bowling_pacespin":"spin bowler","bowling_style":"sla","bowling_style_long":"slow left-arm orthodox ","captain":0,"card_long":"NK Patel","card_qualifier":"","card_short":"NK Patel","dob":"1988-04-20","keeper":0,"known_as":"Nisarg Patel","mobile_name":"Patel","object_id":233258,"player_id":"49174","player_primary_role":null,"player_style_id":null,"player_type":1,"player_type_name":"player","popular_name":"Patel","portrait_alt_id":"4","portrait_object_id":1315453,"status_id":3},{"age_days":283,"age_years":29,"alpha_name":"JASDEEP_SINGH","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"right-arm bowler","bowling_pacespin":"pace bowler","bowling_style":"rm","bowling_style_long":"right-arm medium ","captain":0,"card_long":"Jasdeep Singh","card_qualifier":"","card_short":"Jasdeep Singh","dob":"1993-02-10","keeper":0,"known_as":"Jessy Singh","mobile_name":"Jasdeep","object_id":772471,"player_id":"77577","player_primary_role":"bowler","player_style_id":4,"player_type":1,"player_type_name":"player","popular_name":"Jasdeep","portrait_alt_id":"4","portrait_object_id":1315442,"status_id":3},{"age_days":263,"age_years":31,"alpha_name":"","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"left-arm bowler","bowling_pacespin":"spin bowler","bowling_style":"sla","bowling_style_long":"slow left-arm orthodox ","captain":0,"card_long":"NP Kenjige","card_qualifier":"","card_short":"Kenjige","dob":"1991-03-02","keeper":0,"known_as":"Nosthush Kenjige","mobile_name":"Kenjige","object_id":1041679,"player_id":"93827","player_primary_role":null,"player_style_id":null,"player_type":1,"player_type_name":"player","popular_name":"Kenjige","portrait_alt_id":"4","portrait_object_id":1315455,"status_id":3},{"age_days":35,"age_years":31,"alpha_name":"NETRAVALKAR,SN","batting_hand":"right-hand batter","batting_style":"rhb","batting_style_long":"right-hand bat","bowling_hand":"left-arm bowler","bowling_pacespin":"pace bowler","bowling_style":"lfm","bowling_style_long":"left-arm fast-medium ","captain":1,"card_long":"SN Netravalkar","card_qualifier":"","card_short":"Netravalkar","dob":"1991-10-16","keeper":0,"known_as":"Saurabh Netravalkar","mobile_name":"","object_id":398513,"player_id":"59607","player_primary_role":"bowler","player_style_id":4,"player_type":1,"player_type_name":"player","popular_name":"","portrait_alt_id":"4","portrait_object_id":1318130,"status_id":3}],"players_in_side":11,"site_id":34,"team_abbreviation":"USA","team_filename":"USA","team_general_name":"United States of America","team_id":"11","team_name":"United States of America","team_short_name":"U.S.A.","url_component":"usa"}],"tiebreaker":[],"weather":{"forecast":[]}}

    Here's the scorecard at that point

    image

    USA's team id is 11 (can also be seen from their URL) - https://www.espncricinfo.com/team/united-states-of-america-11

    We don't necessarily need all the details. Current score, batsmen, bowlers, and the last few deliveries should be enough

    vasqued2 commented 1 year ago

    What URL did you use to get the JSON. It's showing as ill-formed for me and I'd like to repull it.

    arsaboo commented 1 year ago

    The website address is - https://www.espncricinfo.com/series/world-cup-league-2-2019-2023-1196667/namibia-vs-united-states-of-america-110th-match-1341970/full-scorecard

    The 1341970 in the URL is the match id that we can use to pull the JSON: https://www.espncricinfo.com/caribbean-premier-league-2015/engine/match/1341970.json

    vasqued2 commented 1 year ago

    What do the numbers 244, 8, 159, and 9 represent? Same question for 42, 50, and 245. Does a match always have only 2 innings? It looks like you can win by runs and by wickets? What do each of those mean? Are any of these numbers runs or wickets?

    arsaboo commented 1 year ago

    So, there are three formats of the game: One Day international (ODI), Twenty-Twenty (T-20), and Test In an ODI match (which is the case here), there are only 2 innings and each side gets to play for 50 over (which is the 50 that you see). 42 is the current over being bowled (out of the 50). 245 is the target for Namibia to win (note that USA made 244 runs).

    arsaboo commented 1 year ago

    There is a tag international_class_card which gives the format.

    Joecstarr commented 1 year ago

    If you look at the traffic for the espnuk site, the ticker on the top of the page has a similar API to the normal ESPN site

    Here's the API root:

    http://new.core.espnuk.org/v2/sports/cricket

    might be able to drop that root in the current tool.

    vasqued2 commented 1 year ago

    Thanks! You can.

    If you set up a Custom API Configuration w/ sport_path: cricket and league_path: 21195 you can pull in up the upcoming game between India and New Zealand on on January 27th.

    I have no idea what we'll get once the match starts but I'll monitor and and see if I need to make any changes to support in-game matches.

    What I don't understand is what makes up a league in cricket. It appears as though each league is a unique number that only contains one game. Also, it seems like the API only has a couple dozen "leagues" - which are really a single competition between two teams - but I'm not sure if there are other 5 digit combos that work as well. I have no context of what I am looking at and need someone to tell me if that makes sense or not. Any insight anyone could give would be appreciated.

    Joecstarr commented 1 year ago

    Like @arsaboo was saying above. When people say cricket it's not really specific enough, it's really three different sports:

    Similar rules but "different", think about differences between Little league, MLB, and softball. Super similar sports but really "different" sports.

    Here's a good explainer on basic rules: https://www.youtube.com/watch?v=EfhTPGSy1aM

    An international series is when a country travels for some number of matches (ie. New Zealand travels to India for a few weeks). The series can contain one or multiple "flavors" of cricket (above).

    The API seems to call a trip from New Zealand to India and the flavor as a league

    "leagues": [
        {
          "id": "21195",
          "uid": "s:200~l:21195",
          "name": "New Zealand in India T20I Series 2022/23",
          "abbreviation": "New Zealand in India T20Is 2022-23",
          "slug": "new-zealand-in-india-t20is-2022-23",
          "classId": [
            "3"
          ],

    and

    "leagues": [
        {
          "id": "21196",
          "uid": "s:200~l:21196",
          "name": "New Zealand in India ODI Series 2022/23",
          "abbreviation": "New Zealand in India ODIs 2022-23",
          "slug": "new-zealand-in-india-odis-2022-23",
          "classId": [
            "2"
          ],

    I think the current tooling won't support this structure. It would need to know to check leagues a team is playing in which isn't a simple change from my brief poking around.

    There's also domestic leagues that play T20 and (50 over). These are more like MLB or NFL again delineated by "flavor".

    ex: http://new.core.espnuk.org/v2/sports/cricket/leagues/8819

    Joecstarr commented 1 year ago

    Here's what you get with the following custom config for league 8819

      - platform: teamtracker
        league_id: XXX
        team_id: CD-W
        sport_path: cricket
        league_path: 8819
        name: tt_centralw

    With card choking and showing:

    image

    When I look at the JSON I don't see any of the scoring information but cricinfo also has no scoring data so.

    For

      - platform: teamtracker
        league_id: XXX
        team_id: IND
        sport_path: cricket
        league_path: 21108
        name: tt_test

    I get

    image

    vasqued2 commented 1 year ago

    The JSON formal it pretty standard so it wouldn't be hard to pull this in.

    It looks like the API does return a Final score. The card just doesn't format such a long score well. The question is whether it never returns a score and linescores while a match is in play or if the CD-W match is an exception. Sometimes the APIs don't return much in-game info so it may not be indicative of all cricket matches.

    The India Final not only returns a final score, it also returns line scores for each innings. The linescore info is usually updated live during the game and is the type of info I normally display in the scroll bar during the game. So that is a reason for optimism.

    Looks like I could display wickets, runs, and overs during the match and show who was at bat. I'd need you to tell me if I should only display the info for the current innings or for the prior ones too.

    The description looks like something that is normally displayed on the clock, so it will be interesting to see what the clock has during a match.

    Overall, it shouldn't be too bad to add, but the real problem is going to be to figure out how to find the league number to get the right match.

    [
      {
        "value": 1,
        "wickets": 10,
        "runs": 227,
        "overs": 73.5,
        "isBatting": true,
        "description": "all out",
        "isCurrent": 0
      },
      {
        "value": 2,
        "wickets": 0,
        "runs": 0,
        "overs": 86.3,
        "isBatting": false,
        "description": "all out",
        "isCurrent": 0
      },
      {
        "value": 3,
        "wickets": 10,
        "runs": 231,
        "overs": 70.2,
        "isBatting": true,
        "description": "all out",
        "isCurrent": 0
      },
      {
        "value": 4,
        "wickets": 0,
        "runs": 0,
        "overs": 47,
        "isBatting": false,
        "description": "target reached",
        "isCurrent": 1
      }
    ]
    Joecstarr commented 1 year ago

    It looks like the espncricinfo pulls from the same source (the event/league id match), and they regularly have live scores. So I suspect that CD-W is a fluke. Also, matching what espncricinfo do for scoring might be worth looking at.

    That IND vs BAN is test cricket which happens over multiple days with multiple innings (think half inning in baseball) I really don't understand how to watch test cricket so maybe @arsaboo has better input for score reporting.

    As for limited over (T20, ODI(50 over)) there's only ever two innings (each team bats once). I'd want to see exactly what espncricinfo has

    team A  {runs}{wickets}        {runs}{wickets}  team B
                 {overs}                {overs}

    That's mostly for the card though.

    For pulling teams that are in multiple leagues how do you handle individual sports like tennis? I imagine the flow is similar.

    vasqued2 commented 1 year ago

    For tennis, everything is in one of two leagues. ATP or WTA, each with it's own single API. Then each tournament is an "event" that is made up multiple "competitions", each having two "competitors."

    For cricket, it looks like there are a ton of leagues, some of which have a single "event" and some of which have multiple. Then each "event" has a single "competition" between two "competitors.

    It has teams in multiple leagues is similar to soccer (i.e. EPL, Champions, and Friendlies). The end user has to know what "leagues" they are in and set a tracker up for each one of them. It's a bit of a pain but unless there is an API that lists all the leagues a team is in that I am not aware of, there is no other way to do it.

    A problem/pain I am seeing is that the API only returns games for a single date, not a range of dates. All other dates accept a range of dates and that allows me to pull in games in the future. Doable, but a pain.

    For example, there work: https://site.api.espn.com/apis/site/v2/sports/cricket/1324623/scoreboard?dates=20230103 https://site.api.espn.com/apis/site/v2/sports/cricket/1324623/scoreboard But this doesn't: https://site.api.espn.com/apis/site/v2/sports/cricket/1324623/scoreboard?dates=20230101-20230103

    vasqued2 commented 1 year ago

    Do you know how to manually install the card? If so, try installing the card from the Postponed-Games branch. I made some changes to better display the cricket info.

    If I'm interpreting what appears in the score correctly, it already incorporates the Runs, Wickets, and Overs so there is no reason to pull in the info from the linescores. And it looks like the score is updated in real time during the game so I think it will work and maybe only need some minor tweaking to sensor like populating the Summary field from the Status

    vasqued2 commented 1 year ago

    v0.6.1 is out for the sensor and the card. Both should support Cricket. See the Wiki for limitations.

    Let me know if you see any problems.

    arsaboo commented 1 year ago

    Is it possible to track a team (irrespective of the league)?

    vasqued2 commented 1 year ago

    No. Soccer has the same issue. You need to set up a separate sensor for each league. I've found no API that says team X plays in leagues A, B, and C.

    You have to set up multiple sensors and then use a combo of Vertical Stack and Conditional cards so that only those cards w/ a status other that NOT_FOUND are displayed and they are always displayed in the same location. That essentially mimics a single sensor/card on the front end. Behind the scenes though, you have multiple sensors calling the API.

    vasqued2 commented 1 year ago

    The next release will have the following minor fixes for cricket:

    Is there anything else you notice that needs fixed before I push these?

    dipranjan commented 1 year ago

    Looking forward to having this cricket issue fixed.. Thanks.. i came searching for a way to show cricket score in Home Assistant

    arsaboo commented 1 year ago

    Is there anything else you notice that needs fixed before I push these?

    Thanks for these updates. I'm currently traveling and will start testing it out starting 13th Jan. I'll have more feedback then. Thanks a ton 🙏

    vasqued2 commented 1 year ago

    I pushed the cricket fixes w/ v0.6.2

    If there are more problems, open an issue for the specific issue. I still need to understand how a team can score more runs in a Test match and it still come out as a draw instead of a win. Right now the card assumes whoever scores the most runs always wins. See the AUS/SA match on Jan 7 for an example.