commit 9c2673a675599c1d5b84f26b4ce2dee13aa5640a
parent 99481f0a18c6262ff2556ac41e5397c491cd665d
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date: Wed, 3 May 2017 21:29:05 +0200
bank's /history used to be a mix of POSTed JSON *and*
URI's parameters (!). Making all POSTed JSON.
Diffstat:
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/api/api-bank.rst b/api/api-bank.rst
@@ -115,16 +115,28 @@ the number of results.
.. http:post:: /history
- **Request**
- :query direction: Optional parameter that lets the caller specify
- only incoming, outgoing, or both types of records. If not given,
- then the API will return both types; if set to `credit` (`debit`),
- only incoming (outgoing) records are returned.
+ **Request** JSON of type `HistoryRequest`_.
**Response** JSON array of type `BankTransaction`_.
+.. _HistoryRequest:
+.. code-block:: tsref
+
+ interface HistoryRequest {
+
+ // Authentication credentials to get right of
+ // issuing this call.
+ auth: BasicAuth;
+
+ // Optional parameter that lets the caller specify
+ // only incoming, outgoing, or both types of records. If not given,
+ // then the API will return both types; if set to `credit` (`debit`),
+ // only incoming (outgoing) records are returned.
+ direction: string;
+
+ }
.. _BankTransaction:
.. code-block:: tsref