Giter Site home page Giter Site logo

pychallonge's People

Contributors

oddballbutler avatar russ- avatar trew avatar zedgr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pychallonge's Issues

Correct timezone in start_time

What's the correct way of providing timezone for start_time?
When I use:
datetime.datetime(int(year), int(month), int(day), int(hours), int(minutes), 0, 0, tzinfo=pytz.timezone('Europe/London'))
it defaults to -05.00 timezone anyway.

Organization API Access

Hi, I was exploring this API, and I could find a good was to extract data from an Organization not just a Member. I was wondering if there is anything you can do to make this possible?

Failing test_index_filter_by_created (__main__.TournamentsTestCase) - Python 2.7.14

Looks like this test case is failing...

(pychallonge-2.7.14) ~/projects/russell/challonge/pychallonge$ CHALLONGE_USER=russellvt CHALLONGE_KEY=$(cat ../api.key) python ./tests.py
...........EE......
======================================================================
ERROR: test_index_filter_by_created (__main__.TournamentsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests.py", line 65, in test_index_filter_by_created
    created_after=datetime.datetime.now().date() - datetime.timedelta(days=1))
  File "/home/russell/projects/russell/challonge/pychallonge/challonge/tournaments.py", line 6, in index
    return api.fetch_and_parse("GET", "tournaments", **params)
  File "/home/russell/projects/russell/challonge/pychallonge/challonge/api.py", line 79, in fetch_and_parse
    doc = ElementTree.parse(fetch(method, uri, params_prefix, **params))
  File "/home/russell/projects/russell/challonge/pychallonge/challonge/api.py", line 63, in fetch
    response = opener.open(req)
  File "/home/russell/.pyenv/versions/2.7.14/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/home/russell/.pyenv/versions/2.7.14/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/russell/.pyenv/versions/2.7.14/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/home/russell/.pyenv/versions/2.7.14/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/home/russell/.pyenv/versions/2.7.14/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 400: Bad Request

Failing test_index_filter_by_state (__main__.TournamentsTestCase) - Python 2.7.14

(pychallonge-2.7.14) ~/projects/russell/challonge/pychallonge$ CHALLONGE_USER=russellvt CHALLONGE_KEY=$(cat ../api.key) python ./tests.py
...........EE......
[...]
======================================================================
ERROR: test_index_filter_by_state (__main__.TournamentsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests.py", line 54, in test_index_filter_by_state
    ts = challonge.tournaments.index(state="pending")
  File "/home/russell/projects/russell/challonge/pychallonge/challonge/tournaments.py", line 6, in index
    return api.fetch_and_parse("GET", "tournaments", **params)
  File "/home/russell/projects/russell/challonge/pychallonge/challonge/api.py", line 79, in fetch_and_parse
    doc = ElementTree.parse(fetch(method, uri, params_prefix, **params))
  File "/home/russell/projects/russell/challonge/pychallonge/challonge/api.py", line 63, in fetch
    response = opener.open(req)
  File "/home/russell/.pyenv/versions/2.7.14/lib/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/home/russell/.pyenv/versions/2.7.14/lib/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/home/russell/.pyenv/versions/2.7.14/lib/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/home/russell/.pyenv/versions/2.7.14/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/home/russell/.pyenv/versions/2.7.14/lib/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 400: Bad Request

----------------------------------------------------------------------

Unable to install package on PyCharm

pip install -e git+http://github.com/russ-/pychallonge#egg=pychallonge
Obtaining pychallonge from git+http://github.com/russ-/pychallonge#egg=pychallonge
Cloning http://github.com/russ-/pychallonge to c:\users\adrien\pycharmprojects\flaskproject\venv\src\pychallonge
ERROR: Command errored out with exit status 1:
command: 'c:\users\adrien\pycharmprojects\flaskproject\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\users\adrien\pycharmprojects\flaskproject\venv\src\pychallonge\setup.py'"'"'; _
file_='"'"'c:\users\adrien\pycharmprojects\flaskproject\venv\src\pychallonge\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code
, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Adrien\AppData\Local\Temp\pip-pip-egg-info-hudrk2z0'
cwd: c:\users\adrien\pycharmprojects\flaskproject\venv\src\pychallonge
Complete output (11 lines):
Traceback (most recent call last):
File "", line 1, in
File "c:\users\adrien\pycharmprojects\flaskproject\venv\src\pychallonge\setup.py", line 2, in
import challonge
File "c:\users\adrien\pycharmprojects\flaskproject\venv\src\pychallonge\challonge_init_.py", line 4, in
from challonge import tournaments, matches, participants
File "c:\users\adrien\pycharmprojects\flaskproject\venv\src\pychallonge\challonge\tournaments.py", line 1, in
from challonge import api
File "c:\users\adrien\pycharmprojects\flaskproject\venv\src\pychallonge\challonge\api.py", line 2, in
import iso8601
ModuleNotFoundError: No module named 'iso8601'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

py --version
Python 3.9.0

Python 3.3

Does pychallonge work with Python 3.3? I keep getting this error when trying to install

    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "E:\pychallonge\src\pychallonge\setup.py", line 2, in <module>
        import challonge
      File ".\challonge\__init__.py", line 4, in <module>
        import tournaments, matches, participants
    ImportError: No module named 'tournaments'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "E:\pychallonge\src\pychallonge\setup.py", line 2, in <module>

    import challonge

  File ".\challonge\__init__.py", line 4, in <module>

    import tournaments, matches, participants

ImportError: No module named 'tournaments'

I have successfully installed and used pychallonge with Python 2.7

Participant Creation

The participant creation seems broken, I can use everything else in the api except the challonge.participants.create() method. I call it with the correct url and a simple name but get the following error:

"ChallongeException: Participant parameters are required"

Removing or adding parameters results in the error:

"TypeError: create() takes exactly 2 arguments (1 given)"

can't install on pyenv on raspberry pi

I'm using 3.6.2 pyenv on anyenv.

[5:50:17]~ >> pip install -e git+https://github.com/russ-/pychallonge                                            
Could not detect requirement name, please specify one with #egg=
[5:50:29]~ >> pip install --e git+https://github.com/russ-/pychallonge#egg=pychallonge                           
zsh: no matches found: git+https://github.com/russ-/pychallonge#egg=pychallonge
[5:50:29]~ >>       

and same error at miniconda on Windows.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.