Skip to content

Commit

Permalink
minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
konstantintogoi committed Apr 5, 2020
1 parent c76d86a commit d2fac8d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
9 changes: 8 additions & 1 deletion docs/source/authorization.rst
Expand Up @@ -7,8 +7,11 @@ for executing API requests after authorization.

After authorization you will receive:

* :code:`session_key` (aka :code:`access_token`)
* :code:`session_key` aka :code:`access_token`
* :code:`uid` that is necessary only when :code:`secret_key` not passed
* :code:`refresh_token`
* :code:`expires_in`
* :code:`token_type` if Implicit Grant used

Authorization Code Grant
------------------------
Expand All @@ -17,6 +20,7 @@ Authorization Code Grant
from aiomailru import CodeSession, API
app_id = 123456
private_key = 'abcde'
secret_key = ''
Expand All @@ -36,6 +40,7 @@ Implicit Grant
from aiomailru import ImplicitSession, API
app_id = 123456
private_key = ''
secret_key = 'xyz'
Expand All @@ -54,6 +59,7 @@ Password Grant
from aiomailru import PasswordSession, API
app_id = 123456
private_key = 'abcde'
secret_key = 'xyz'
Expand All @@ -72,6 +78,7 @@ Refresh Token
from aiomailru import RefreshSession, API
app_id = 123456
private_key = ''
secret_key = ''
Expand Down
4 changes: 2 additions & 2 deletions docs/source/index.rst
Expand Up @@ -3,8 +3,8 @@
:end-before: index-end-marker1

.. toctree::
:maxdepth: 1
:caption: Manual:
:maxdepth: 2
:caption: Contents:

getting_started
authorization
Expand Down
10 changes: 10 additions & 0 deletions docs/source/session.rst
Expand Up @@ -24,6 +24,7 @@ ClientSession
session = ClientSession(app_id, 'private key', 'access token', uid)
api = API(session)
...
CodeClientSession
~~~~~~~~~~~~~~~~~
Expand All @@ -36,6 +37,7 @@ CodeClientSession
async with CodeClientSession(app_id, 'private key', code, redirect_uri) as session:
api = API(session)
...
ImplicitClientSession
~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -48,6 +50,7 @@ ImplicitClientSession
async with ImplicitClientSession(app_id, 'private key', email, passwd, scope) as session:
api = API(session)
...
PasswordClientSession
~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -60,6 +63,7 @@ PasswordClientSession
async with PasswordClientSession(app_id, 'private key', email, passwd, scope) as session:
api = API(session)
...
RefreshClientSession
~~~~~~~~~~~~~~~~~~~~
Expand All @@ -72,6 +76,7 @@ RefreshClientSession
async with RefreshClientSession(app_id, 'private key', refresh_token) as session:
api = API(session)
...
Server-Server signature circuit
-------------------------------
Expand All @@ -87,6 +92,7 @@ ServerSession
session = ServerSession(app_id, 'secret key', 'access token')
api = API(session)
...
CodeServerSession
~~~~~~~~~~~~~~~~~
Expand All @@ -99,6 +105,7 @@ CodeServerSession
async with CodeServerSession(app_id, 'secret key', code, redirect_uri) as session:
api = API(session)
...
ImplicitServerSession
~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -111,6 +118,7 @@ ImplicitServerSession
async with ImplicitServerSession(app_id, 'secret key', email, passwd, scope) as session:
api = API(session)
...
PasswordServerSession
~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -123,6 +131,7 @@ PasswordServerSession
async with PasswordServerSession(app_id, 'secret key', email, passwd scope) as session:
api = API(session)
...
RefreshServerSession
~~~~~~~~~~~~~~~~~~~~
Expand All @@ -135,3 +144,4 @@ RefreshServerSession
async with RefreshServerSession(app_id, 'secret key', refresh_token) as session:
api = API(session)
...

0 comments on commit d2fac8d

Please sign in to comment.