diff --git a/.bumpversion.cfg b/.bumpversion.cfg index ed9d834..976ea45 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.0.12 +current_version = 0.0.13 parse = (?P\d+)\.(?P\d+)\.(?P\d+) serialize = {major}.{minor}.{patch} diff --git a/CHANGELOG.md b/CHANGELOG.md index c12ca77..7764b9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [0.0.13] - 2022-11-03 +### Added +- Use `backend_path` config value when making API requests to Noteable + ## [0.0.12] - 2022-11-03 ### Added - Allow user to specify http & websocket protocol for client diff --git a/origami/_version.py b/origami/_version.py index eb6d06c..4ecffbc 100644 --- a/origami/_version.py +++ b/origami/_version.py @@ -1 +1 @@ -version = "0.0.12" +version = "0.0.13" diff --git a/origami/client.py b/origami/client.py index 56c543b..9a4b460 100644 --- a/origami/client.py +++ b/origami/client.py @@ -82,7 +82,7 @@ class ClientConfig(BaseModel): http_protocol: str = "https" websocket_protocol: str = "wss" domain: str = "app.noteable.io" - backend_path: str = "gate/api/" + backend_path: str = "gate/api" auth0_domain: str = "" audience: str = "https://app.noteable.io/gate" ws_timeout: int = 10 @@ -151,6 +151,7 @@ def __init__( self.config.websocket_protocol = os.getenv( "NOTEABLE_WEBSOCKET_PROTOCOL", self.config.websocket_protocol ) + self.config.backend_path = os.getenv("NOTEABLE_BACKEND_PATH", self.config.backend_path) self.file_session_cache = {} self.user = None @@ -184,12 +185,12 @@ def origin(self): @property def ws_uri(self): """Formats the websocket URI out of the notable domain name.""" - return f"{self.config.websocket_protocol}://{self.config.domain}/gate/api/v1/rtu" + return f"{self.config.websocket_protocol}://{self.config.domain}/{self.config.backend_path}/v1/rtu" @property def api_server_uri(self): """Formats the http API URI out of the notable domain name.""" - return f"{self.config.http_protocol}://{self.config.domain}/gate/api" + return f"{self.config.http_protocol}://{self.config.domain}/{self.config.backend_path}" def get_token(self): """Fetches and api token using oauth client config settings. diff --git a/pyproject.toml b/pyproject.toml index 827c6ea..e706ad6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ [tool.poetry] name = "noteable-origami" -version = "0.0.12" +version = "0.0.13" description = "The Noteable API interface" authors = ["Matt Seal "] maintainers = ["Matt Seal "]