Skip to content
This repository has been archived by the owner on Nov 24, 2020. It is now read-only.

Commit

Permalink
Allowed parameter passing to tournaments.index()
Browse files Browse the repository at this point in the history
  • Loading branch information
Russ Amos committed Jul 31, 2011
1 parent 5e8870c commit 94e3cc1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions challonge/tournaments.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from challonge import api


def index():
def index(**params):
"""Retrieve a set of tournaments created with your account."""
doc = api.fetch_and_parse("GET", "tournaments")
doc = api.fetch_and_parse("GET", "tournaments", **params)

tournaments = []

Expand Down
2 changes: 1 addition & 1 deletion tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_get_credentials(self):

def test_call(self):
challonge.set_credentials(self.username, self.api_key)
challonge.fetch("GET", "tournaments")
self.assertNotEqual(challonge.fetch("GET", "tournaments"), '')


class TournamentsTestCase(unittest.TestCase):
Expand Down

0 comments on commit 94e3cc1

Please sign in to comment.