mlb-led-scoreboard icon indicating copy to clipboard operation
mlb-led-scoreboard copied to clipboard

Integrate broadcast service into pregame info

Open twfarley opened this issue 2 years ago • 7 comments

https://statsapi.mlb.com/api/v1/schedule?sportId=1&date=2022-04-10&hydrate=broadcasts

twfarley avatar Apr 19 '22 21:04 twfarley

There will be two difficulties with this:

One, the schedule is one of the few places we call a function in statsapi rather than using the endpoint directly. So, we’d probably want to add this to the schedule function there, see: https://github.com/toddrob99/MLB-StatsAPI/issues/71

Secondly, this is not available from the game endpoint, so it will need to be passed in from the constructor. This isn’t a conceptually difficult thing to do, but it’s unfortunate from a standpoint of code cleanliness

WardBrian avatar Apr 19 '22 21:04 WardBrian

I have a working branch that does this here: https://github.com/WardBrian/mlb-led-scoreboard/tree/pregame-broadcast

It depends on https://github.com/toddrob99/MLB-StatsAPI/pull/85

WardBrian avatar Aug 04 '22 18:08 WardBrian

I'm going to try this out soon, thanks

you're project is exactly what i'm looking to do!

ZachPL avatar Aug 04 '22 18:08 ZachPL

For now I just stuck it at the end of the starting pitchers preview

WardBrian avatar Aug 04 '22 19:08 WardBrian

@WardBrian I commented out the is isnational check, in order for it to show for example YES network for the yankees, it might not be ideal for it to show all broadcasts including radio stations espeicially for everyone, but maybe a parameter to turn that on or off?

This year the yankees can be on prime, youtube, yes, national broadcasts, so it's pretty convenient to show them all.

ZachPL avatar Aug 09 '22 00:08 ZachPL

My theory is if it doesn’t say anything, you should be able to know it’s the default (E.g all of those besides YES should be marked as national)

WardBrian avatar Aug 09 '22 00:08 WardBrian

That makes sense, for my use case my grandpa texts me every day what channel the game is on and I know if it doesn't say specifically he will have questions.

ZachPL avatar Aug 09 '22 23:08 ZachPL