summaryrefslogtreecommitdiff
path: root/docs/api.rst
blob: 9a725065ae68c704da03eb534e9819e7107a0341 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Soledad API
===========

.. contents::
   :local:

.. _client-side-code-api:

Client-side code API
--------------------

.. autoclass:: leap.soledad.client.Soledad
    :members:
    :undoc-members:

.. _client-side-attachments-api:

Client-side attachments API
---------------------------

.. autoclass:: leap.soledad.client._document.AttachmentStates
   :members:
   :undoc-members:

.. autointerface:: leap.soledad.client._document.IDocumentWithAttachment
   :members:
   :undoc-members:


.. _server-side-attachments-rest-api:

Server-side attachments REST API
--------------------------------

These are the possible ways to interact with the attachments REST API on the
server side:

===========  ================  ======== ==================
HTTP Method  URL               Content  Possible responses
===========  ================  ======== ==================
GET          /user_id          -        200
GET          /user_id/blob_id  -        200, 404
PUT          /user_id/blob_id  The BLOB 200, 409, 507
DELETE       /user_id/blob_id  -        200
===========  ================  ======== ==================

Server-side attachments code API
--------------------------------

.. _i-blobs-backend:

.. autoclass:: leap.soledad.server.interfaces.IBlobsBackend
   :members:
   :undoc-members:

.. _filesystem-blobs-backend:

.. autoclass:: leap.soledad.server._blobs.FilesystemBlobsBackend
   :members:
   :undoc-members: