Merge pull request #13 from Psycojoker/sync_readme_and_doc_example

Synchronise readme and doc example
This commit is contained in:
Lorenz Diener 2017-04-03 12:03:00 +02:00 cometido por GitHub
commit cd1beedffe

Veure arxiu

@ -2,6 +2,27 @@ Mastodon.py
=========== ===========
.. code-block:: python .. code-block:: python
from mastodon import Mastodon
# Register app - only once!
'''
Mastodon.create_app(
'pytooterapp',
to_file = 'pytooter_clientcred.txt'
)
'''
# Log in - either every time, or use persisted
'''
mastodon = Mastodon(client_id = 'pytooter_clientcred.txt')
mastodon.log_in(
'my_login_email@example.com',
'incrediblygoodpassword',
to_file = 'pytooter_usercred.txt'
)
'''
# Create actual instance
mastodon = Mastodon( mastodon = Mastodon(
client_id = 'pytooter_clientcred.txt', client_id = 'pytooter_clientcred.txt',
access_token = 'pytooter_usercred.txt' access_token = 'pytooter_usercred.txt'