Version 1.0¶
Deprecated
Version 2.0¶
Instantiate Footy¶
>>> from footylib import Footy
>>> footy = Footy()
Get a competition object¶
>>> competitions = footy.competitions
Search for teams¶
>>> team = footy.search_team("Hangover")
>>> team
[<footylib.footylib.Team object at 0x10dffcad0>, <footylib.footylib.Team object at 0x10e8f7250>]
Get a team object¶
>>> team = footy.get_team("Hangover 69")
Generate calendar season for a team¶
>>> team.calendar
Exporting calendar to a file¶
with open('calendar.ics', 'wb') as ics:
ics.write(team.calendar.to_ical())
Get all attributes¶
>>> for competition in competitions:
print "Standings for {}".format(competition.name)
for team in competition.teams:
print '\t', 'Team: {}'.format(team.name)
print '\t\t', 'Position: {}'.format(team.position)
print '\t\t', 'Played games {}'.format(team.played_games)
print '\t\t', 'Won games {}'.format(team.won_games)
print '\t\t', 'Tie games {}'.format(team.tie_games)
print '\t\t', 'Lost games {}'.format(team.lost_games)
print '\t\t', 'Goals {}'.format(team.goals)
print '\t\t', 'Division {}'.format(team.division)
print '\t\t', 'Diff {}'.format(team.diff)
print '\t\t', 'Points {}'.format(team.points)
print "Calendar for {}".format(competition.name)
for match in competition.matches:
print '\t', 'Location: {}'.format(match.location)
print '\t', 'Name: {}'.format(match.title)
print '\t', 'Score: {}'.format(match.score)
print '\t', 'Referee: {}'.format(match.referee)
print '\t', 'Division: {}'.format(match.division)
print '\t', 'Date: {}'.format(match.datetime)
print '\t', 'MOTM: {}'.format(match.motm)