<s> from soccermetrics . rest . resources import Resource <EOL> from soccermetrics . rest . resources . events import MatchEvents <EOL> from soccermetrics . rest . resources . statistics import MatchStatistics <EOL> class MatchResource ( Resource ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , play , base_uri , auth ) : <EOL> """<STR_LIT>""" <EOL> super ( MatchResource , self ) . __init__ ( base_uri , auth ) <EOL> self . base_endpoint = "<STR_LIT>" % ( self . endpoint , play ) <EOL> self . match = None <EOL> self . resource = None <EOL> def EndpointURI ( self ) : <EOL> """<STR_LIT>""" <EOL> return '<STR_LIT:/>' . join ( str ( x ) for x in [ self . base_endpoint , self . match , self . resource ] if x ) <EOL> def get ( self , match = None , uid = None , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> self . match = match <EOL> self . endpoint = self . EndpointURI ( ) <EOL> return super ( MatchResource , self ) . get ( uid , ** kwargs ) <EOL> def head ( self ) : <EOL> """<STR_LIT>""" <EOL> self . match = None <EOL> self . endpoint = self . EndpointURI ( ) <EOL> return super ( MatchResource , self ) . head ( ) <EOL> def options ( self ) : <EOL> """<STR_LIT>""" <EOL> self . match = None <EOL> self . endpoint = self . EndpointURI ( ) <EOL> return super ( MatchResource , self ) . options ( ) <EOL> class MatchInformation ( MatchResource ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , play , base_uri , auth ) : <EOL> super ( MatchInformation , self ) . __init__ ( play , base_uri , auth ) <EOL> self . resource = "<STR_LIT:info>" <EOL> class MatchConditions ( MatchResource ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , play , base_uri , auth ) : <EOL> super ( MatchConditions , self ) . __init__ ( play , base_uri , auth ) <EOL> self . resource = "<STR_LIT>" <EOL> class MatchLineups ( MatchResource ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , play , base_uri , auth ) : <EOL> super ( MatchLineups , self ) . __init__ ( play , base_uri , auth ) <EOL> self . resource = "<STR_LIT>" <EOL> class MatchGoals ( MatchResource ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , play , base_uri , auth ) : <EOL> super ( MatchGoals , self ) . __init__ ( play , base_uri , auth ) <EOL> self . resource = "<STR_LIT>" <EOL> class MatchPenalties ( MatchResource ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , play , base_uri , auth ) : <EOL> super ( MatchPenalties , self ) . __init__ ( play , base_uri , auth ) <EOL> self . resource = "<STR_LIT>" <EOL> class MatchOffenses ( MatchResource ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , play , base_uri , auth ) : <EOL> super ( MatchOffenses , self ) . __init__ ( play , base_uri , auth ) <EOL> self . resource = "<STR_LIT>" <EOL> class MatchSubstitutions ( MatchResource ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , play , base_uri , auth ) : <EOL> super ( MatchSubstitutions , self ) . __init__ ( play , base_uri , auth ) <EOL> self . resource = "<STR_LIT>" <EOL> class MatchShootouts ( MatchResource ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , play , base_uri , auth ) : <EOL> super ( MatchShootouts , self ) . __init__ ( play , base_uri , auth ) <EOL> self . resource = "<STR_LIT>" <EOL> class MatchPlay ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , play , base_uri , auth ) : <EOL> self . information = MatchInformation ( play , base_uri , auth ) <EOL> self . lineups = MatchLineups ( play , base_uri , auth ) <EOL> self . conditions = MatchConditions ( play , base_uri , auth ) <EOL> self . goals = MatchGoals ( play , base_uri , auth ) <EOL> self . penalties = MatchPenalties ( play , base_uri , auth ) <EOL> self . offenses = MatchOffenses ( play , base_uri , auth ) <EOL> self . substitutions = MatchSubstitutions ( play , base_uri , auth ) <EOL> self . shootouts = MatchShootouts ( play , base_uri , auth ) <EOL> self . stats = MatchStatistics ( play , base_uri , auth ) <EOL> self . events = MatchEvents ( play , base_uri , auth ) </s>
