Skip to content
Snippets Groups Projects
Commit 660470df authored by Vincent Texier's avatar Vincent Texier Committed by Vincent Texier
Browse files

[fix] #58 fix reverse_url path bug

parent 647bae19
No related branches found
No related tags found
2 merge requests!94Merge dev into master for release 0.56.0,!84#58: WS2P support
...@@ -207,8 +207,11 @@ class API: ...@@ -207,8 +207,11 @@ class API:
server, port = self.connection_handler.server, self.connection_handler.port server, port = self.connection_handler.server, self.connection_handler.port
if self.connection_handler.path: if self.connection_handler.path:
url = "{scheme}://{server}:{port}/{path}".format( url = "{scheme}://{server}:{port}/{api_path}".format(
scheme=scheme, server=server, port=port, path=path scheme=scheme,
server=server,
port=port,
api_path=self.connection_handler.path,
) )
else: else:
url = "{scheme}://{server}:{port}/".format( url = "{scheme}://{server}:{port}/".format(
......
...@@ -8,8 +8,8 @@ from duniterpy.key import SigningKey ...@@ -8,8 +8,8 @@ from duniterpy.key import SigningKey
# CONFIG ####################################### # CONFIG #######################################
# You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] # You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] [PATH]
# or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] # or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] [PATH]
# Here we use the secure BASIC_MERKLED_API (BMAS) # Here we use the secure BASIC_MERKLED_API (BMAS)
BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443" BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443"
......
...@@ -4,8 +4,8 @@ from duniterpy.api import bma ...@@ -4,8 +4,8 @@ from duniterpy.api import bma
# CONFIG ####################################### # CONFIG #######################################
# You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] # You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] [PATH]
# or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] # or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] [PATH]
# Here we use the secure BASIC_MERKLED_API (BMAS) # Here we use the secure BASIC_MERKLED_API (BMAS)
BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443" BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443"
......
...@@ -5,8 +5,8 @@ from duniterpy.api.client import Client ...@@ -5,8 +5,8 @@ from duniterpy.api.client import Client
# CONFIG ####################################### # CONFIG #######################################
# You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] # You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] [PATH]
# or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] # or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] [PATH]
# Here we use the secure BASIC_MERKLED_API (BMAS) # Here we use the secure BASIC_MERKLED_API (BMAS)
BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443" BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443"
......
...@@ -7,8 +7,8 @@ from duniterpy.api.client import Client ...@@ -7,8 +7,8 @@ from duniterpy.api.client import Client
# CONFIG ####################################### # CONFIG #######################################
# You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] # You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] [PATH]
# or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] # or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] [PATH]
# Here we use the secure BASIC_MERKLED_API (BMAS) # Here we use the secure BASIC_MERKLED_API (BMAS)
ES_CORE_ENDPOINT = "ES_CORE_API g1-test.data.duniter.fr 443" ES_CORE_ENDPOINT = "ES_CORE_API g1-test.data.duniter.fr 443"
ES_USER_ENDPOINT = "ES_USER_API g1-test.data.duniter.fr 443" ES_USER_ENDPOINT = "ES_USER_API g1-test.data.duniter.fr 443"
......
...@@ -10,8 +10,8 @@ from duniterpy.api.client import Client ...@@ -10,8 +10,8 @@ from duniterpy.api.client import Client
# CONFIG ####################################### # CONFIG #######################################
# You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] # You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] [PATH]
# or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] # or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] [PATH]
# Here we use the secure BASIC_MERKLED_API (BMAS) # Here we use the secure BASIC_MERKLED_API (BMAS)
BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443" BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443"
......
...@@ -17,9 +17,9 @@ from duniterpy.api.client import Client ...@@ -17,9 +17,9 @@ from duniterpy.api.client import Client
# CONFIG ####################################### # CONFIG #######################################
# You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] # You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] [PATH]
# or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] # or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] [PATH]
# Here we use the WS2P API (WS2P [UUID] [DOMAIN] [PORT]) # Here we use the WS2P API (WS2P [UUID] [DOMAIN] [PORT] [PATH])
# You can find the UUID of a node with the /network/ws2p/heads BMA API request # You can find the UUID of a node with the /network/ws2p/heads BMA API request
# or in your node user interface in the network view in the WS2PID column # or in your node user interface in the network view in the WS2PID column
WS2P_ENDPOINT = "WS2P 96675302 g1-test.duniter.org 443" WS2P_ENDPOINT = "WS2P 96675302 g1-test.duniter.org 443"
......
...@@ -20,8 +20,8 @@ else: ...@@ -20,8 +20,8 @@ else:
# CONFIG ####################################### # CONFIG #######################################
# You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] # You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] [PATH]
# or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] # or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] [PATH]
# Here we use the secure BASIC_MERKLED_API (BMAS) # Here we use the secure BASIC_MERKLED_API (BMAS)
BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443" BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443"
......
...@@ -10,8 +10,8 @@ from duniterpy.key import SigningKey ...@@ -10,8 +10,8 @@ from duniterpy.key import SigningKey
# CONFIG ####################################### # CONFIG #######################################
# You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] # You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] [PATH]
# or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] # or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] [PATH]
# Here we use the secure BASIC_MERKLED_API (BMAS) # Here we use the secure BASIC_MERKLED_API (BMAS)
BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443" BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443"
......
...@@ -8,8 +8,8 @@ from duniterpy.key import SigningKey ...@@ -8,8 +8,8 @@ from duniterpy.key import SigningKey
# CONFIG ####################################### # CONFIG #######################################
# You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] # You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] [PATH]
# or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] # or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] [PATH]
# Here we use the secure BASIC_MERKLED_API (BMAS) # Here we use the secure BASIC_MERKLED_API (BMAS)
BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443" BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443"
......
...@@ -15,8 +15,8 @@ from duniterpy.key import SigningKey ...@@ -15,8 +15,8 @@ from duniterpy.key import SigningKey
# CONFIG ####################################### # CONFIG #######################################
# You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] # You can either use a complete defined endpoint : [NAME_OF_THE_API] [DOMAIN] [IPv4] [IPv6] [PORT] [PATH]
# or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] # or the simple definition : [NAME_OF_THE_API] [DOMAIN] [PORT] [PATH]
# Here we use the secure BASIC_MERKLED_API (BMAS) # Here we use the secure BASIC_MERKLED_API (BMAS)
BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443" BMAS_ENDPOINT = "BMAS g1-test.duniter.org 443"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment