Giter Club home page Giter Club logo

Comments (6)

panzarino avatar panzarino commented on July 23, 2024

I'm not sure if there is a way to get this information, but I will look around to see if mlb has the data somewhere

from mlbgame.

trevor-viljoen avatar trevor-viljoen commented on July 23, 2024

Looks like players.xml in the game directory contains the coaching staff, bullpen catchers, 25-man roster plus anyone on the DL.

Here's an example: http://gd2.mlb.com/components/game/mlb/year_2017/month_04/day_15/gid_2017_04_15_houmlb_oakmlb_1/players.xml

http://mlb.mlb.com/mlb/fantasy/injuries/#team117
http://mlb.mlb.com/mlb/fantasy/injuries/#team133

I haven't found a simple way to get the 40-man roster yet.

from mlbgame.

panzarino avatar panzarino commented on July 23, 2024

That's on a per game basis, but I guess mlb.com must just use the data from the most recent game, so they keep creating a new xml file for each game rather than update a centralized one (I assume). That makes it a lot harder to consistently be able to get the most up to date roster, as the only way to get it would be that 25-man roster from the most recent game.

Not sure how I should go about implementing this feature, any thoughts? Looks like the only way to do it now is on a per game basis, where the user could get the player information by passing a game id as a parameter.

from mlbgame.

trevor-viljoen avatar trevor-viljoen commented on July 23, 2024

@panzarino Have a look at this: https://github.com/wellsoliver/py-mlb/blob/master/py_mlb/fetcher.py#L18

http://mlb.mlb.com/lookup/json/named.roster_40.bam?team_id=117

from mlbgame.

panzarino avatar panzarino commented on July 23, 2024

@DigitalSaint very interesting... I will definitely work on implementing that relatively soon.

from mlbgame.

panzarino avatar panzarino commented on July 23, 2024

Closing since this has been implemented into master.

from mlbgame.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.