gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: testing history


From: gnunet
Subject: [libeufin] branch master updated: testing history
Date: Wed, 11 Dec 2019 21:25:18 +0100

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

marcello pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 674852b  testing history
674852b is described below

commit 674852b959cee5e1824932d2ad0359af1af0d1f3
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Dec 11 21:25:05 2019 +0100

    testing history
---
 sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt |  5 +----
 sandbox/src/main/python/libeufin-cli                  | 16 ++++++++++++++--
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index c101792..6a0cc09 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -239,10 +239,7 @@ fun main() {
             post("/{id}/history") {
 
                 val req = call.receive<CustomerHistoryRequest>()
-                val startDate = DateTime.parse(req.start)
-                val endDate = DateTime.parse(req.end)
-
-                LOGGER.debug("Fetching history from ${startDate.toString()}, 
to ${endDate.toString()}")
+                LOGGER.debug("Fetching history from ${req.start}, to 
${req.end}")
 
                 val customer = findCustomer(call.parameters["id"])
                 val ret = CustomerHistoryResponse()
diff --git a/sandbox/src/main/python/libeufin-cli 
b/sandbox/src/main/python/libeufin-cli
index 15caf19..11fe518 100755
--- a/sandbox/src/main/python/libeufin-cli
+++ b/sandbox/src/main/python/libeufin-cli
@@ -306,12 +306,24 @@ def new(obj, user_id, partner_id, system_id, host_id, 
ebics_url):
     required=False,
     default=1
 )
-def history(obj, user_id):
+@click.option(
+    "--start",
+    help="starting date for history elements (YYYY-MM-DD)" ,
+    required=False,
+    default=None
+)
+@click.option(
+    "--end",
+    help="ending date for history elements (YYYY-MM-DD)" ,
+    required=False,
+    default=None
+)
+def history(obj, user_id, start, end):
 
     url = urljoin(obj["bank_base_url"], f"/{user_id}/history")
     print(url)
     try:
-        resp = post(url, json=dict(start="2000-01-01", end="2999-12-31"))
+        resp = post(url, json=dict(start=start, end=end))
     except Exception:
         print("Could not reach the bank")
         return

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



reply via email to

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