Update README.md
This commit is contained in:
pare
4fced75d90
commit
4d19b21940
S'han modificat 1 arxius amb 19 adicions i 16 eliminacions
31
README.md
31
README.md
|
@ -6,10 +6,10 @@ Python wrapper for the Akkoma (https://akkoma.dev/AkkomaGang/akkoma) API.
|
|||
from akkoma import Akkoma
|
||||
|
||||
'''
|
||||
Akkoma.create_app(
|
||||
'pytooterapp',
|
||||
api_base_url = 'https://yourakkomainstance.social',
|
||||
to_file = 'pytooter_clientcred.secret'
|
||||
client_id, client_secret = Akkoma.create_app(
|
||||
'app_name',
|
||||
to_file="app_clientcred.txt",
|
||||
api_base_url = 'https://yourakkoma.instance'
|
||||
)
|
||||
'''
|
||||
|
||||
|
@ -17,14 +17,17 @@ Python wrapper for the Akkoma (https://akkoma.dev/AkkomaGang/akkoma) API.
|
|||
|
||||
from akkoma import Akkoma
|
||||
|
||||
akkoma = Akkoma(
|
||||
client_id = 'pytooter_clientcred.secret',
|
||||
api_base_url = 'https://yourakkomainstance.social'
|
||||
)
|
||||
akkoma = Akkoma(client_id = "app_clientcred.txt", api_base_url = 'https://yourakkoma.instance')
|
||||
|
||||
grant_type = 'password'
|
||||
|
||||
akkoma.log_in(
|
||||
'my_login_email@example.com',
|
||||
'incrediblygoodpassword',
|
||||
to_file = 'pytooter_usercred.secret'
|
||||
client_id,
|
||||
client_secret,
|
||||
grant_type,
|
||||
'user',
|
||||
'password',
|
||||
to_file = "app_usercred.txt"
|
||||
)
|
||||
|
||||
# To post, create an actual API instance.
|
||||
|
@ -32,9 +35,9 @@ Python wrapper for the Akkoma (https://akkoma.dev/AkkomaGang/akkoma) API.
|
|||
from akkoma import Akkoma
|
||||
|
||||
akkoma = Akkoma(
|
||||
access_token = 'pytooter_usercred.secret',
|
||||
api_base_url = 'https://yourakkomainstance.social'
|
||||
access_token = 'app_usercred.txt',
|
||||
api_base_url = 'https://yourakkoma.instance'
|
||||
)
|
||||
akkoma.status_post('Tooting from python using #akkomapy !')
|
||||
akkoma.status_post('Posting from python using Akkoma.py !')
|
||||
|
||||
|
||||
|
|
Loading…
Referencia en una nova incidència