Skip to content

Commit

Permalink
adding adapter section to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
filipeximenes committed Feb 26, 2016
1 parent 501780e commit 925ad30
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docs/source/adapter.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
==========
=======
Adapter
==========
=======

**This document is under devolpment, it should show describe all Adapter methods and how to use them**


Authentication helpers
---------------------
----------------------

You can implement the ```refresh_authentication``` and ```is_authentication_expired``` methods in your Tapioca Client to refresh your authentication token every time that it expires.
```is_authentication_expired``` receives an error object from the request method (it contains the server response and HTTP Status code). You can use it to decide if a request failed because of the token. This method should return true if the authentication is expired or false otherwise.

If the authentication is expired, ```refresh_authentication``` is called. This method does not receive any parameter.

.. code-block:: python
def is_authentication_expired(self,error)
....
def refresh_authentication(self):
...
Expand Down
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Contents:

about
quickstart
adapter
serializers
exceptions
flavours
Expand Down

0 comments on commit 925ad30

Please sign in to comment.