SomeRandomGuys / fantasy_football_rails_app

A fantasy football application in Ruby on Rails, duh!
3 stars 1 forks source link

Change variable name (to match whoscored variables) #2

Open a2l2 opened 11 years ago

a2l2 commented 11 years ago

A lot of the stats are named something funny. We can either change the names of the variables exposed by the api or have the tool co-relate the variable names & send the api what it needs. Anyway here is the list of variable name mismatches.

Current > WhoScored

red_card_count > red_card yellow_card_count > yellow_card who_scored_rating > rating tackles_fail > tackles_lost shots_saved > saves passes_fail > pass_inaccurate passes_successful > accurate_pass penalty_scored > penalty_shootout_scored

[missing] > second_yellow [missing] > penalty_shootout_saved_gk / penalty_shootout_saved [missing] > penalty_shootout_conceded_gk

There are a few more but I'm lazy to write it all down. Lets decide which approach we want to go and then we can figure out what to do.

a2l2 commented 11 years ago

Heres a list of all the stats with their associated whoscored keys (hopefully they don't change):

'mins_played': 'mins_played', 'goals_scored': 'goals_normal' + 'goals 'goals_allowed': 'goals_conceded_gk', 'goal_assists': 'goal_assist', 'own_goals': 'own_goals', 'red_card_count': 'red_card', 'yellow_card_count': 'yellow_card' or 'second_yellow' 'tackles_fail': 'tackle_lost', 'tackles_successful': 'won_tackle', 'passes_fail': 'pass_inaccurate', 'passes_successful': 'accurate_pass', 'shots_on_target': 'total_scoring_att', 'shots_off_target': 'shot_off_target', 'shots_saved': 'saves', 'penalty_scored': 'penalty_shootout_scored', 'penalty_missed': 'penalty_missed', 'penalty_saved': 'penalty_shootout_saved', 'dribbles_lost': 'who_scored_rating': 'rating', 'man_of_the_match' : 'man_of_the_match'