gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: new command to the CLI


From: gnunet
Subject: [libeufin] branch master updated: new command to the CLI
Date: Mon, 05 Oct 2020 17:51:19 +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 8fd2d57  new command to the CLI
8fd2d57 is described below

commit 8fd2d57d52187fc280c40c9b2478c40605399907
Author: MS <ms@taler.net>
AuthorDate: Mon Oct 5 17:51:09 2020 +0200

    new command to the CLI
---
 .idea/vcs.xml    |  1 +
 cli/libeufin-cli | 15 +++++++++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 35eb1dd..37d8908 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -2,5 +2,6 @@
 <project version="4">
   <component name="VcsDirectoryMappings">
     <mapping directory="" vcs="Git" />
+    <mapping directory="$PROJECT_DIR$/build-common" vcs="Git" />
   </component>
 </project>
\ No newline at end of file
diff --git a/cli/libeufin-cli b/cli/libeufin-cli
index d498d83..2390365 100755
--- a/cli/libeufin-cli
+++ b/cli/libeufin-cli
@@ -200,8 +200,20 @@ def download_bank_accounts(obj, connection_name, 
nexus_user_id, nexus_password,
         return
     print(resp.content.decode("utf-8"))
 
+@connections.command(help="list the connections")
+@click.option("--nexus-user-id", help="Nexus user ID", required=True)
+@click.option("--nexus-password", help="Nexus password", required=True)
+@click.argument("nexus-base-url")
+def list_connections(nexus_user_id, nexus_password, nexus_base_url):
+    url = urljoin(nexus_base_url, "/bank-connections/")
+    try:
+        resp = get(url, json=dict(), auth = auth.HTTPBasicAuth(nexus_user_id, 
nexus_password))
+    except Exception:
+        print("Could not reach nexus")
+        return
+    print(resp.content.decode("utf-8"))
 
-@connections.command(help="list offered (= downloaded) bank accounts")
+@connections.command(help="list bank accounts hosted at one connection")
 @click.option("--connection-name", help="Connection ID", required=True)
 @click.option("--nexus-user-id", help="Nexus user ID", required=True)
 @click.option("--nexus-password", help="Nexus password", required=True)
@@ -260,7 +272,6 @@ def prepare_payment(obj, account_name, credit_iban, 
credit_bic, credit_name,
         return
     print(resp.content.decode("utf-8"))
 
-
 @accounts.command(help="submit a prepared payment")
 @click.option("--account-name", help="bank account name", required=True)
 @click.option("--payment-uuid", help="payment unique identifier", 
required=True)

-- 
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]