Sports‎ > ‎Baseball‎ > ‎Notifications‎ > ‎

Following Players

Original idea:
the player that I've picked in Beat the Streak® is about to come up to bat (notify me just as the player before him in the batting order gets to the plate) so that I can watch the player and celebrate when he does get a hit. (Also, as soon as the game is official, notify me if he got a hit by then, and not after the full game.)
I'm in a fantasy baseball pool, so I have follow a list of players. For the pool's sake, I only really care what they do cumulatively. That said, I have a stake in their individual outings, either an at bat or the innings they pitch.
  • Starting pitchers: whether they're starting. That means I'd have to be notified/reminded that they're starting, and watch the start of the game up until they are pulled or finish the game.
  • Relief pitchers: I'd need to be notified of them warming up in the bullpen.
  • Position players: I'd need to know whether they're in the lineup. I already get notified when they're not in the lineup, so I can bench them if it's the right thing to do. That takes them out of the picture if they enter the game later, either as a defensive replacement or pinch-hitting. If I just want to watch their at bat, I'd need to be notified during the at bat of the previous batter, at the end of the half inning if they lead off. If they're on deck with two outs, then I'd need to make sure I'm re-notified if they don't end up batting.
TheScore does per-at bat notifications of the outcome of at bats, and will also notify me if they're not in the lineup. They don't notify me of when they're about to bat.

Information to include:
  • Team he belongs to, so I can call up the game in MLB.tv.
  • Direct link to the MLB.tv game?
  • Recent stats, or how he's been doing for me in the pool this week. If today is Monday, show last week's stats.
Bonus: if I'm attending a game (which the app would know because I'm checked in via Foursquare), maybe it would give me extra buzz, i.e. point out that it's a player I'm seeing in the flesh.

Algorithm:

Given a list of players:
  • get the team they play for
    •  if the team plays today:
      • determine if the team plays a doubleheader
      • either way, for each game
        • get the time the team plays
        • a half an hour before the game
          • get the lineup
        • if the player is the starting pitcher, send me a notification/reminder to watch the game
        • else if the player is the lineup, if they are starting, or if they are a relief pitcher:
          • subscribe to events of the game (see "game subscription")
  • game subscription:
    • at game time:
      • check to see if I'm checked into the venue via Foursquare, set flag on that player
    • if a batter:
      • get the player that bats before them.
      • when that batter is batting, notify me that my player is about to bat. If I'm at the game (see above flag), point out that the player is there in the flesh.
    • if a relief pitcher, find out if they are warming up in the bullpen, notify me