Beispiel #1
0
def show(*matches):
    """Information about matches."""
    matches = convert_csv(matches)
    r = requests.get(endpoint("/match/details"), params={"match", matches})
    r.raise_for_status()

    return r.json()
Beispiel #2
0
def show(*teams):
    """Returns information on multiple teams.
    Example::

        >>> cobalt.teams.show(4666, 2073, 1678)
        [{ ... }, { ... }, { ... }]

    This can also be used to query a single team (by only providing one
    team as an argument). In this scenario, however, :func:`details` may
    be preferred as (while it only accepts a single team for an
    argument) it returns more information on teams than :func:`show`
    does.
    """
    teams = convert_csv(map(teamkey, teams))
    r = requests.get(endpoint('/teams/show'), params={ 'teams': teams })
    r.raise_for_status()

    return r.json()