The namespace logic currently has two namespaces:
class Namespaces(Enum):
AUTH = "auth"
LOCATIONS = "locations"
If we want to update this to be used by the other projects, we'll need more namespaces.
At the same time, maybe this, along with the below, isn't the best way to build URLs accessing the PDAP API 🤔:
def build_url(self, namespace: Namespaces, subdomains: Optional[list[str]] = None) -> str:
"""
Build url from namespace and subdomains
:param namespace:
:param subdomains:
:return:
"""
url = f"{self.api_url}/{namespace.value}"
if subdomains is not None:
url = f"{url}/{'/'.join(subdomains)}"
return url
So we should investigate what makes the most sense for this.
The namespace logic currently has two namespaces:
If we want to update this to be used by the other projects, we'll need more namespaces.
At the same time, maybe this, along with the below, isn't the best way to build URLs accessing the PDAP API 🤔:
So we should investigate what makes the most sense for this.