Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Disqus API bindings for Python

License

NotificationsYou must be signed in to change notification settings

disqus/disqus-python

Repository files navigation

https://travis-ci.org/disqus/disqus-python.svg?branch=master

Let's start with installing the API:

pip install disqus-python

Use the API by instantiating it, and then calling the method through dotted notation chaining:

from disqusapi import DisqusAPIdisqus = DisqusAPI(secret_key, public_key)for result in disqus.get('trends.listThreads'):    print result

Parameters (including the ability to override version, api_secret, and format) are passed as keyword arguments to the resource call:

disqus.get('posts.details', post=1, version='3.0')

Paginating through endpoints is easy as well:

from disqusapi import Paginatorpaginator = Paginator(api.get, 'trends.listThreads', forum='disqus')for result in paginator:    print result# pull in a maximum of 500 results (this limit param differs from the endpoint's limit param)for result in paginator(limit=500):    print result

Documentation on all methods, as well as general API usage can be found athttps://disqus.com/api/docs/

About

Disqus API bindings for Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors11


[8]ページ先頭

©2009-2025 Movatter.jp