[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: python tool calls /ebics/subscribers n
From: |
gnunet |
Subject: |
[libeufin] branch master updated: python tool calls /ebics/subscribers now. |
Date: |
Fri, 08 Nov 2019 13:25:08 +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 a36f42a python tool calls /ebics/subscribers now.
a36f42a is described below
commit a36f42a1ebfd2ea3e4ff325742fa9b1020852266
Author: Marcello Stanisci <address@hidden>
AuthorDate: Fri Nov 8 13:24:49 2019 +0100
python tool calls /ebics/subscribers now.
---
nexus/src/main/kotlin/Main.kt | 7 ++---
sandbox/src/main/python/libeufin-cli | 50 ++++++++++++++++++++++++++++++++++++
2 files changed, 54 insertions(+), 3 deletions(-)
diff --git a/nexus/src/main/kotlin/Main.kt b/nexus/src/main/kotlin/Main.kt
index 819dd79..f79efe1 100644
--- a/nexus/src/main/kotlin/Main.kt
+++ b/nexus/src/main/kotlin/Main.kt
@@ -248,9 +248,10 @@ fun main() {
}.id.value
}
- call.respond(
- HttpStatusCode.OK,
- EbicsSubscriberInfoResponse(id)
+ call.respondText(
+ "Subscriber registered, ID: ${id}",
+ ContentType.Text.Plain,
+ HttpStatusCode.OK
)
return@post
}
diff --git a/sandbox/src/main/python/libeufin-cli
b/sandbox/src/main/python/libeufin-cli
index 6ba3aea..f6b96f8 100755
--- a/sandbox/src/main/python/libeufin-cli
+++ b/sandbox/src/main/python/libeufin-cli
@@ -76,4 +76,54 @@ def sync(obj, customer_id):
print(resp.content.decode("utf-8"))
+
+@ebics.command(help="insert new subscriber into Nexus")
+@click.pass_obj
+@click.option(
+ "--ebics-url",
+ help="URL of the EBICS server (defaults to http://localhost:5001/)",
+ required=False,
+ default="http://localhost:5001"
+)
+@click.option(
+ "--user-id",
+ help="ID of the user to add in the system" ,
+ required=True
+)
+@click.option(
+ "--partner-id",
+ help="ID of the partner associated with the user" ,
+ required=True
+)
+@click.option(
+ "--system-id",
+ help="ID of the software acting on behalf of this user" ,
+ required=False
+)
+@click.option(
+ "--host-id",
+ help="ID of the EBICS server" ,
+ required=True
+)
+def new(obj, user_id, partner_id, system_id, host_id, ebics_url):
+
+ url = urljoin(obj["base_url"], "/ebics/subscribers")
+ body = json=dict(
+ ebicsURL=ebics_url,
+ userID=user_id,
+ partnerID=partner_id,
+ hostID=host_id
+ )
+
+ if system_id:
+ body.update(system_id)
+
+ try:
+ resp = post(url, json=body)
+ except Exception:
+ print("Could not reach the bank")
+ return
+
+ print(resp.content.decode("utf-8"))
+
cli()
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: python tool calls /ebics/subscribers now.,
gnunet <=