Skip to content

Commit 1656c1f

Browse files
committed
Merge branch 'master' into experimental/opaque-compression
2 parents 4fdc3bc + d26f8d6 commit 1656c1f

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ from datetime import datetime
1111
from elimity_insights_client import Client, Config, ConnectorLog, Level
1212

1313
if __name__ == "__main__":
14-
config = Config(base_path="https://local.elimity.com:8081/api", token="token")
14+
config = Config(url="https://local.elimity.com:8081", token="token")
1515
client = Client(config)
1616

1717
timestamp = datetime.now()
@@ -31,4 +31,4 @@ $ pip install git+https://github.com/elimity-com/insights-client-python.git
3131
| Client version | Insights version |
3232
| -------------- | ---------------- |
3333
| 1 | 2.8 - 2.10 |
34-
| 2 | ^2.11 |
34+
| 2 - 3 | ^2.11 |

elimity_insights_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def _request(
9292
path: str,
9393
) -> Response:
9494
config = self._config
95-
url = f"{config.base_path}/{path}"
95+
url = f"{config.url}/api/{path}"
9696
cert = _cert(config.certificate)
9797
authorization = f"Bearer {config.token}"
9898
headers = {"Authorization": authorization, **additional_headers}
@@ -107,7 +107,7 @@ def _request(
107107
class Config:
108108
"""Configuration for an Elimity Insights client."""
109109

110-
base_path: str
110+
url: str
111111
token: str
112112
verify_ssl: bool = True
113113
certificate: Optional[Certificate] = None

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@
2626
python_requires=">=3.7",
2727
py_modules=["elimity_insights_client"],
2828
url="https://github.com/elimity-com/insights-client-python",
29-
version="2.0.1",
29+
version="3.0.0",
3030
)

test_elimity_insights_client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ def _create_client(handler_class) -> Iterable[Client]:
142142
thread = Thread(target=server.serve_forever)
143143
thread.start()
144144

145-
base_path = f"http://localhost:{server.server_port}"
146-
config = Config(base_path=base_path, token="foo")
145+
url = f"http://localhost:{server.server_port}"
146+
config = Config(url=url, token="foo")
147147
try:
148148
yield Client(config)
149149
finally:
@@ -164,7 +164,7 @@ class _CreateConnectorLogsHandler(BaseHTTPRequestHandler):
164164
protocol_version = "HTTP/1.1"
165165

166166
def do_POST(self) -> None:
167-
if self.path != "/custom-connector-logs":
167+
if self.path != "/api/custom-connector-logs":
168168
self.send_error(HTTPStatus.NOT_FOUND)
169169
return
170170

@@ -211,7 +211,7 @@ class _GetDomainGraphSchemaHandler(BaseHTTPRequestHandler):
211211
protocol_version = "HTTP/1.1"
212212

213213
def do_GET(self) -> None:
214-
if self.path != "/domain-graph-schema":
214+
if self.path != "/api/domain-graph-schema":
215215
self.send_error(HTTPStatus.NOT_FOUND)
216216
return
217217

@@ -261,7 +261,7 @@ class _ReloadDomainGraphHandler(BaseHTTPRequestHandler):
261261
protocol_version = "HTTP/1.1"
262262

263263
def do_POST(self) -> None:
264-
if self.path != "/custom-connector-domain-graphs":
264+
if self.path != "/api/custom-connector-domain-graphs":
265265
self.send_error(HTTPStatus.NOT_FOUND)
266266
return
267267

0 commit comments

Comments
 (0)