gnunet-svn
[Top][All Lists]
Advanced

[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: Wed, 15 Jun 2022 09:25:29 +0200

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 4604a460 cli
4604a460 is described below

commit 4604a46031933edd78380a4782c318574ce2b8bd
Author: MS <ms@taler.net>
AuthorDate: Wed Jun 15 09:24:54 2022 +0200

    cli
    
    add 'demobank' command to list transactions
---
 cli/bin/libeufin-cli | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/cli/bin/libeufin-cli b/cli/bin/libeufin-cli
index 168fca7a..9e6da423 100755
--- a/cli/bin/libeufin-cli
+++ b/cli/bin/libeufin-cli
@@ -1206,6 +1206,28 @@ def sandbox_bankaccount(ctx):
 def sandbox_demobank(ctx):
     pass
 
+@sandbox_demobank.command("list-transactions", help="List transactions.")
+@click.option(
+    "--bank-account",
+    help="Label of the bank account to be debited for the transaction.",
+    required=True
+)
+@click.pass_obj
+def sandbox_demobank_list_transactions(obj, bank_account):
+    url = obj.access_api_url (f"/accounts/{bank_account}/transactions")
+    try:
+        resp = get(
+            url,
+            auth=auth.HTTPBasicAuth(obj.username, obj.password),
+        )
+    except Exception as e:
+        print(e)
+        print("Could not reach sandbox at " + url)
+        exit(1)
+
+    tell_user(resp, withsuccess=True)
+
+
 @sandbox_demobank.command("new-transaction", help="Initiate a new 
transaction.")
 @click.option(
     "--bank-account",

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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