Example #1
0
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)
Example #3
0
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)
Example #4
0
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)
Example #5
0
def index(tournament):
    """Retrieve a tournament's participant list."""
    return api.fetch_and_parse(
        "GET",
        "tournaments/%s/participants" % tournament)
Example #6
0
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))
Example #7
0
def index(tournament, **params):
    """Retrieve a tournament's match list."""
    return api.fetch_and_parse(
        "GET",
        "tournaments/%s/matches" % tournament,
        **params)
Example #8
0
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))
Example #9
0
def index(tournament):
    """Retrieve a tournament's participant list."""
    return api.fetch_and_parse(
        "GET",
        "tournaments/%s/participants" % tournament)
Example #10
0
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))
Example #11
0
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)
Example #12
0
def show(tournament):
    """Retrieve a single tournament record created with your account."""
    return api.fetch_and_parse("GET", "tournaments/%s" % tournament)
Example #13
0
def index(**params):
    """Retrieve a set of tournaments created with your account."""
    return api.fetch_and_parse("GET", "tournaments", **params)
Example #14
0
def show(tournament):
    """Retrieve a single tournament record created with your account."""
    return api.fetch_and_parse("GET", "tournaments/%s" % tournament)