Small documentation adjustments

This commit is contained in:
Lorenz Diener 2017-06-15 20:48:59 +02:00
pare 5ed78fbe83
commit 03e19e3655
S'han modificat 2 arxius amb 9 adicions i 10 eliminacions

Veure arxiu

@ -11,6 +11,7 @@ Mastodon.py
'''
Mastodon.create_app(
'pytooterapp',
api_base_url = 'https://mastodon.social',
to_file = 'pytooter_clientcred.secret'
)
'''
@ -21,16 +22,18 @@ Mastodon.py
mastodon.log_in(
'my_login_email@example.com',
'incrediblygoodpassword',
api_base_url = 'https://mastodon.social',
to_file = 'pytooter_usercred.secret'
)
'''
# Create actual instance
# Create actual API instance
mastodon = Mastodon(
client_id = 'pytooter_clientcred.secret',
access_token = 'pytooter_usercred.secret'
access_token = 'pytooter_usercred.secret',
api_base_url = 'https://mastodon.social'
)
mastodon.toot('Tooting from python!')
mastodon.toot('Tooting from python using #mastodonpy !')
`Mastodon`_ is an ostatus based twitter-like federated social
network node. It has an API that allows you to interact with its

Veure arxiu

@ -22,10 +22,6 @@ class Mastodon:
If anything is unclear, check the official API docs at
https://github.com/Gargron/mastodon/wiki/API
Supported:
Username-Password Login
OAuth2
"""
__DEFAULT_BASE_URL = 'https://mastodon.social'
__DEFAULT_TIMEOUT = 300