public void GetKickerStats(Kicker k, NFLv3StatsClient client, int week) { var tmpPlayer = client.GetPlayerGameStatsByPlayerID("2018", week, k.playerID); if (tmpPlayer != null) { k.epAtt = (int)tmpPlayer.ExtraPointsAttempted; k.epMade = (int)tmpPlayer.ExtraPointsMade; k.fgAtt = (int)tmpPlayer.FieldGoalsAttempted; k.fgMade = (int)tmpPlayer.FieldGoalsMade; } else { k = new Kicker(); } }
public void GetWRRBTEStats(WRRBTE b, NFLv3StatsClient client, int week) { var tmpPlayer = client.GetPlayerGameStatsByPlayerID("2018", week, b.playerID); if (tmpPlayer != null) { b.fumbles = (int)tmpPlayer.Fumbles; b.rushAtt = (int)tmpPlayer.RushingAttempts; b.rushYds = (double)tmpPlayer.RushingYards; b.rushTDs = (int)tmpPlayer.RushingTouchdowns; b.rec = (int)tmpPlayer.Receptions; b.recYds = (double)tmpPlayer.ReceivingYards; b.recTDs = (int)tmpPlayer.ReceivingTouchdowns; } else { b = new WRRBTE(); } }
public void GetQBStats(Quarterback q, NFLv3StatsClient client, int week) { var currSeason = "2018"; var tmpPlayer = client.GetPlayerGameStatsByPlayerID(currSeason, week, q.playerID); if (tmpPlayer != null) { q.fumbles = (int)tmpPlayer.Fumbles; q.passAtt = (int)tmpPlayer.PassingAttempts; q.passCmp = (int)tmpPlayer.PassingCompletions; q.passYds = (double)tmpPlayer.PassingYards; q.passTDs = (int)tmpPlayer.PassingTouchdowns; q.interc = (int)tmpPlayer.Interceptions; q.sacks = (int)tmpPlayer.Sacks; q.rushYds = (double)tmpPlayer.RushingYards; q.rushTDs = (int)tmpPlayer.RushingTouchdowns; } else { // if the player did not play that week for a reason other than a bye wekk their stats will be zero'd // this was necessary because the API does not maintain weekly records for inactive players q = new Quarterback(); } }