Skip to content

Commit

Permalink
feat: added URL path support for bots' hosts (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhook authored Nov 24, 2023
1 parent eb86fe7 commit 69d5f34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pybotx/client/botx_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Type,
TypeVar,
)
from urllib.parse import urljoin
from urllib.parse import urlunparse
from uuid import UUID

import httpx
Expand Down Expand Up @@ -88,8 +88,8 @@ async def execute(self, *args: Any, **kwargs: Any) -> Any: # type: ignore
raise NotImplementedError("You should define `execute` method")

def _build_url(self, path: str) -> str:
host = self._bot_accounts_storage.get_host(self._bot_id)
return urljoin(f"https://{host}", path)
host = self._bot_accounts_storage.get_host(self._bot_id).rstrip("/")
return urlunparse(("https", host, path, "", "", ""))

def _verify_and_extract_api_model(
self,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pybotx"
version = "0.60.3"
version = "0.61.0"
description = "A python library for interacting with eXpress BotX API"
authors = [
"Sidnev Nikolay <[email protected]>",
Expand Down

0 comments on commit 69d5f34

Please sign in to comment.