Skip to content

Commit

Permalink
Fix CSV league_scores output
Browse files Browse the repository at this point in the history
  • Loading branch information
Saturn committed Jan 14, 2019
1 parent bd78693 commit b8d41df
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions soccer/writers.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,15 +261,18 @@ def standings(self, league_table, league):
for team in league_table['standing'])
self.generate_output(result)

def league_scores(self, total_data, time):
def league_scores(self, total_data, time, show_upcoming, use_12_hour_format):
"""Store output of fixtures based on league and time to a CSV file"""
headers = ['League', 'Home Team Name', 'Home Team Goals',
'Away Team Goals', 'Away Team Name']
result = [headers]
result.extend([league, score['homeTeamName'],
score['result']['goalsHomeTeam'],
score['result']['goalsAwayTeam'], score['awayTeamName']]
for league, score in self.supported_leagues(total_data))
league = total_data['competition']['name']
result.extend([league,
score['homeTeam']['name'],
score['score']['fullTime']['homeTeam'],
score['score']['fullTime']['awayTeam'],
score['awayTeam']['name']]
for score in total_data['matches'])
self.generate_output(result)


Expand Down

0 comments on commit b8d41df

Please sign in to comment.