[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: CLI
From: |
gnunet |
Subject: |
[libeufin] branch master updated: CLI |
Date: |
Thu, 14 Jan 2021 19:40:34 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new d9fbb72 CLI
d9fbb72 is described below
commit d9fbb7239d580c4791d2c962c14b835261125aea
Author: ms <ms@taler.net>
AuthorDate: Thu Jan 14 19:39:54 2021 +0100
CLI
Provide less verbose option to see the
list of downloaded transactions.
---
cli/bin/libeufin-cli | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/cli/bin/libeufin-cli b/cli/bin/libeufin-cli
index b386811..0e45332 100755
--- a/cli/bin/libeufin-cli
+++ b/cli/bin/libeufin-cli
@@ -527,9 +527,15 @@ def fetch_transactions(obj, account_name, range_type,
level):
@accounts.command(help="get transactions from the simplified nexus JSON API")
+@click.option(
+ "--compact/--no-compact",
+ help="Tells only amount/subject for each payment",
+ required=False,
+ default=False
+)
@click.argument("account-name")
@click.pass_obj
-def transactions(obj, account_name):
+def transactions(obj, compact, account_name):
url = urljoin(
obj.nexus_base_url,
"/bank-accounts/{}/transactions".format(account_name)
)
@@ -539,8 +545,17 @@ def transactions(obj, account_name):
print("Could not reach nexus " + url)
exit(1)
- tell_user(resp, withsuccess=True)
+ if compact and resp.status_code == 200:
+ for payment in resp.json()["transactions"]:
+ for entry in payment["batches"]:
+ for expected_singleton in entry["batchTransactions"]:
+ print("{}, {}".format(
+
expected_singleton["details"]["unstructuredRemittanceInformation"],
+ expected_singleton["amount"]
+ ))
+ return
+ tell_user(resp, withsuccess=True)
@facades.command(help="List active facades in the Nexus")
@click.argument("connection-name")
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: CLI,
gnunet <=