コード例 #1
0
def get_last_fixtures_points_goals(team_fixtures,
                                   team_id,
                                   key=lambda x: True,
                                   match_date=datetime.datetime.now(),
                                   count=5):
    last_fixtures = FixturesOperation.last_fixtures(team_fixtures, count,
                                                    match_date, key)
    return get_points_goals(last_fixtures, team_id)
コード例 #2
0
 def get_h2h_fixtures(self, count=5, before=datetime.datetime.now()):
     return FixturesOperation.last_fixtures(self.h2h_fixtures, count,
                                            before)
コード例 #3
0
 def get_h2h_h_a_fixtures(self, count=5, before=datetime.datetime.now()):
     return FixturesOperation.last_fixtures(
         self.h2h_fixtures, count, before,
         lambda x: x.home_team_id == self.home_team.team_id)
コード例 #4
0
 def get_away_fixtures(self, count=5, before=datetime.datetime.now()):
     return FixturesOperation.last_fixtures(
         self.fixtures, count, before,
         lambda x: x.away_team_id == self.team_id)