sportsdataverse-py icon indicating copy to clipboard operation
sportsdataverse-py copied to clipboard

MLB Related Functions Not Working & Possible Change in MLB API

Open KeeonTabrizi opened this issue 1 year ago • 0 comments

Using an endpoint constructed from this function: https://github.com/sportsdataverse/sportsdataverse-py/blob/4343fa413943f32833bfe77ad433f339e9d34390/sportsdataverse/mlb/mlbam_games.py#L39

https://lookup-service-prod.mlb.com/json/named.org_game_type_date_info.bam?current_sw=%27Y%27&sport_code=%27mlb%27&game_type=%27R%27&season=%272022%27

It currently returns the following:

{"org_game_type_date_info":{"copyRight":" NOTICE: This file is no longer actively supported. Please use the MLB Stats API (http://statsapi.mlb.com/docs/) as an alternative. Copyright 2023 MLB Advanced Media, L.P. Use of any content on this page acknowledges agreement to the terms posted here http://gdx.mlb.com/components/copyright.txt ","queryResults":{"totalSize":"0","created":"2023-07-11T20:12:30"}}}

Seperately I did have some import errors on the MLB module but I think these are superseded by the issue above:


import sportsdataverse as sdv

sdv.mlb.mlbam_games.mlbam_schedule(2022, gameType='R')

>> AttributeError: module 'sportsdataverse' has no attribute 'mlb'

KeeonTabrizi avatar Jul 11 '23 20:07 KeeonTabrizi