diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..3d2a8ad --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,9 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/python +{ + "name": "Python 3", + "image": "mcr.microsoft.com/devcontainers/python:2-3.9-trixie", + + "postCreateCommand": ["bash",".devcontainer/post-create.sh"] + +} diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh new file mode 100644 index 0000000..5e4606a --- /dev/null +++ b/.devcontainer/post-create.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +pip install pipenv +pipenv install --dev \ No newline at end of file diff --git a/CODEOWNERS b/CODEOWNERS index dca7cac..5938940 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* @coveo/dx +* @coveo/dxui diff --git a/src/push_api_clientpy/platformclient.py b/src/push_api_clientpy/platformclient.py index c210c82..a09c4ba 100644 --- a/src/push_api_clientpy/platformclient.py +++ b/src/push_api_clientpy/platformclient.py @@ -188,10 +188,17 @@ def pushFileContainerContent(self, sourceId: str, fileContainer: FileContainer): return self.session.put(url=url, params=queryParams, headers=self.__headers()) def __basePushURL(self): - return f'https://api-{self.region}.cloud.coveo.com/push/v1/organizations/{self.organizationid}' + if self.region == "us": + return f'https://api.cloud.coveo.com/push/v1/organizations/{self.organizationid}' + else: + return f'https://api-{self.region}.cloud.coveo.com/push/v1/organizations/{self.organizationid}' + def __basePlatformURL(self): - return f'https://platform-{self.region}.cloud.coveo.com/rest/organizations/{self.organizationid}' + if self.region == "us": + return f'https://platform.cloud.coveo.com/rest/organizations/{self.organizationid}' + else: + return f'https://platform-{self.region}.cloud.coveo.com/rest/organizations/{self.organizationid}' def __baseSourceURL(self): return f'{self.__basePlatformURL()}/sources'