File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,12 @@ def __init__(self, api_key: str):
7373 )
7474
7575 self .api_key = api_key
76+ self .base_url = os .getenv ("OPENLAYER_SERVER_URL" , OPENLAYER_ENDPOINT ).rstrip (
77+ "/"
78+ )
79+ if not self .base_url .endswith ("/v1" ):
80+ self .base_url += "/v1"
81+
7682 self ._headers = {
7783 "Content-Type" : "application/json" ,
7884 "Authorization" : f"Bearer { self .api_key } " ,
@@ -143,7 +149,7 @@ def _api_request(
143149 ):
144150 """Make any HTTP request + error handling."""
145151
146- url = f"{ OPENLAYER_ENDPOINT } /{ endpoint } "
152+ url = f"{ self . base_url } /{ endpoint } "
147153
148154 res = self ._http_request (
149155 method = method ,
Original file line number Diff line number Diff line change 2323 )
2424"""
2525
26- __version__ = "0.1.0a35 "
26+ __version__ = "0.1.0a36 "
You can’t perform that action at this time.
0 commit comments