def create(tournament, name, **params): """Add a participant to a tournament.""" params.update({"name": name}) return api.fetch_and_parse( "POST", "tournaments/%s/participants" % tournament, "participant", **params)
def create(name, url, tournament_type="single elimination", **params): """Create a new tournament.""" params.update({ "name": name, "url": url, "tournament_type": tournament_type, }) return api.fetch_and_parse("POST", "tournaments", "tournament", **params)
def create(name, url, tournament_type="single elimination", subdomain='', **params): """Create a new tournament.""" params.update({ "name": name, "url": url, "tournament_type": tournament_type, "subdomain": subdomain }) return api.fetch_and_parse("POST", "tournaments", "tournament", **params)
def index(tournament): """Retrieve a tournament's participant list.""" return api.fetch_and_parse( "GET", "tournaments/%s/participants" % tournament)
def show(tournament, participant_id): """Retrieve a single participant record for a tournament.""" return api.fetch_and_parse( "GET", "tournaments/%s/participants/%s" % (tournament, participant_id))
def index(tournament, **params): """Retrieve a tournament's match list.""" return api.fetch_and_parse( "GET", "tournaments/%s/matches" % tournament, **params)
def show(tournament, match_id): """Retrieve a single match record for a tournament.""" return api.fetch_and_parse( "GET", "tournaments/%s/matches/%s" % (tournament, match_id))
def index(subdomain='', **params): """Retrieve a set of tournaments created with your account.""" params.update({ "subdomain": subdomain }) return api.fetch_and_parse("GET", "tournaments", **params)
def show(tournament): """Retrieve a single tournament record created with your account.""" return api.fetch_and_parse("GET", "tournaments/%s" % tournament)
def index(**params): """Retrieve a set of tournaments created with your account.""" return api.fetch_and_parse("GET", "tournaments", **params)