MCPcopy
hub / github.com/raiden-network/raiden / api_url_for

Function api_url_for

raiden/tests/integration/api/rest/utils.py:73–79  ·  view source on GitHub ↗
(api_server, endpoint, **kwargs)

Source from the content-addressed store, hash-verified

71
72
73def api_url_for(api_server, endpoint, **kwargs):
74 # url_for() expects binary address so we have to convert here
75 for key, val in kwargs.items():
76 if isinstance(val, str) and val.startswith("0x"):
77 kwargs[key] = to_canonical_address(val)
78 with api_server.flask_app.app_context():
79 return url_for(f"v1_resources.{endpoint}", **kwargs)

Calls

no outgoing calls