disqus / disqus-python

Disqus API bindings for Python
https://disqus.com/api/docs/
Apache License 2.0
165 stars 51 forks source link

Bug with first lines of code in documentation? #23

Open lee-hodg opened 10 years ago

lee-hodg commented 10 years ago

I installed disqus-python then tried the basic example with my secret key and public key:

pip install disqus-python
from disqusapi import DisqusAPI
disqus = DisqusAPI(secret_key, public_key)

However now when I do

disqus.get('trends.listThreads')

I get the error:

TypeError: __call__() takes exactly 1 argument (2 given)
lee-hodg commented 10 years ago

I see now that the version pip installed doesn't match the current master, nevertheless even installing with

 pip install git+https://github.com/disqus/disqus-python.git

I had issues with disqus.get('trends.listThreads') and needed to use disqus.get('trends.listThreads', method='GET'), so I guess the docs should be updated to reflect this.

onyxfish commented 9 years ago

Bump. This doesn't appear to work at all.

ivanov commented 9 years ago

thanks for the bump, @onyxfish fix is on the way!

rmtew commented 9 years ago

pip install disqus-python still installs a version that errors as above.

File "update.py", line 70, in run_disqus for result in disqus.get("posts.list", forum="myforum"): TypeError: call() takes exactly 1 argument (3 given)

svengt commented 8 years ago

+1

loneboat commented 8 years ago

+1

Still getting this error as of Jan 2016

mxrss commented 8 years ago

@loneboat

I had luck by following the directions here

https://github.com/disqus/disqus-python/issues/22

What you need to do is do a pip install of this

pip install https://github.com/disqus/disqus-python/archive/master.zip

aktivkohle commented 7 years ago

Am using Python 3. The error changed to InterfaceNotDefined: Interface is not defined, you must pass ``method`` (HTTP Method). ...after I redid pip install from the git master.

@fpghost suggestion above for result in disqus.get('trends.listThreads', method='GET'): fixed it (thanks!) now it is nicely returning threads. Would be handy if this missing bit of code was in the original README.rst

martinosorb commented 6 years ago

2018 here, still not fixed. This is really badly maintained.