gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-api] branch master updated: spec new /history API


From: gnunet
Subject: [GNUnet-SVN] [taler-api] branch master updated: spec new /history API
Date: Fri, 24 Mar 2017 15:52:16 +0100

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository api.

The following commit(s) were added to refs/heads/master by this push:
     new da141e9  spec new /history API
da141e9 is described below

commit da141e9df73ed69af69d7078312109917ceb7b4f
Author: Marcello Stanisci <address@hidden>
AuthorDate: Fri Mar 24 15:52:09 2017 +0100

    spec new /history API
---
 api/api-merchant.rst | 30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/api/api-merchant.rst b/api/api-merchant.rst
index 71e4007..e35afe1 100644
--- a/api/api-merchant.rst
+++ b/api/api-merchant.rst
@@ -464,31 +464,37 @@ The following API are made available by the merchant's 
`backend` to the merchant
 
   **Request**
 
-  :query date: only transactions *jounger* than this parameter will be 
returned. It's a timestamp, given in seconds.
-
+  :query date: only transactions *older* than this parameter will be returned. 
It's a timestamp, given in seconds.
+               Being optional, it defaults to the current time if not given.
+  :query start: only transactions having `row_id` less than `start` will be 
returned. Being optional, it defaults to the
+                highest `row_id` contained in the DB (namely, the youngest 
entry).
+  :query delta: at most `delta` entries will be returned. Being optional, it 
defaults to 20.
+  :query instance: on behalf of which merchant instance the query should be 
accomplished.
+
+  A typical usage is to firstly call this API without `start` and `date` 
parameter, then fetch the oldest
+  `row_id` from the results, and then keep calling the API by using the oldest 
row ID as `start` parameter.
+  This way we simply "scroll" results from the youngest to the oldest, `delta` 
entries at time.
+  
   **Response**
 
-  :status 200 OK: The response is a JSON `array` of  `TransactionHistory`_.
+  :status 200 OK: The response is a JSON `array` of  `TransactionHistory`_.  
The array is sorted such that entry `i` is younger than entry `i+1`.
 
   .. _tsref-type-TransactionHistory:
   .. _TransactionHistory:
   .. code-block:: tsref
 
     interface TransactionHistory {
-      // transaction id
-      transaction_id: number;
-
-      // Hashcode of the relevant contract
-      h_proposal_data: HashCode;
+      // The serial number this entry has in the merchant's DB.
+      row_id: number;
 
-      // Exchange's base URL
-      exchange: string;
+      // order ID of the transaction related to this entry.
+      order_id: string;
 
       // Transaction's timestamp
       timestamp: Timestamp;
 
-      // Price payed for this transaction
-      total_amount: Amount;
+      // Total amount associated to this transaction.
+      amount: Amount;
     }
 
 .. _proposal:

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]