Skip to content

Commit

Permalink
Doc config update
Browse files Browse the repository at this point in the history
  • Loading branch information
fp12 committed Dec 30, 2016
1 parent 42db9bd commit bbdc881
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
12 changes: 9 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
sys.path.insert(0, os.path.abspath('..'))


on_rtd = os.getenv('READTHEDOCS') == 'True'

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand All @@ -31,9 +33,13 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.napoleon']
extensions = ['sphinx.ext.autodoc']

if on_rtd:
extensions.append('sphinxcontrib.napoleon')
else:
extensions.append('sphinx.ext.napoleon')


# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
16 changes: 8 additions & 8 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ Getting Started

Simple example::

import challonge
import asyncio
import challonge
import asyncio

my_username = 'challonge_username'
my_api_key = 'challonge_api_key'
my_username = 'challonge_username'
my_api_key = 'challonge_api_key'

async def main(loop):
async def main(loop):
my_user = challonge.get_user(my_username, my_api_key)
my_tournaments = await my_user.get_tournaments()
for t in my_tournaments:
print(t.name)
print(t.name)

loop = asyncio.get_event_loop()
loop.run_until_complete(main(loop))
loop = asyncio.get_event_loop()
loop.run_until_complete(main(loop))



Expand Down

0 comments on commit bbdc881

Please sign in to comment.