Module push_to_3yourmind.api.common
API methods common to all panels.
Classes
class CommonAPI (access_token: str, base_url: str)
-
Expand source code
class CommonAPI(BaseAPI): """ Accessible via namespace `common`, for example: >>> response = client.common.get_colors() """ def get_colors(self) -> t.List[types.ResponseDict]: return self._request("GET", "colors/") def get_units(self) -> t.List[types.ResponseDict]: """ Get list of units of measure available on the platform. Currently, "mm" and "inch". """ return self._request("GET", "units/") def get_countries(self) -> t.List[types.ResponseDict]: """ Get list of countries with codes and full names """ return self._request("GET", "countries/") def get_currencies(self) -> t.List[str]: """ Get list of currencies available on the platform """ return self._request("GET", "currencies/") def get_materials(self) -> t.List[types.ResponseDict]: return self._request("GET", "materials/") # def get_forms(self): # return self._request("GET", "forms/") def get_tax_types(self) -> t.List[str]: return self._request("GET", "tax-types/")
Accessible via namespace
common
, for example:>>> response = client.common.get_colors()
Args
access_token
- to create a token, open
/admin/auth/user/
, and click "Create token" in the user list. base_url
- application URL, ex. https://app.3yourmind.com
Ancestors
Methods
def get_colors(self) ‑> List[Dict[str, Any]]
-
Expand source code
def get_colors(self) -> t.List[types.ResponseDict]: return self._request("GET", "colors/")
def get_units(self) ‑> List[Dict[str, Any]]
-
Expand source code
def get_units(self) -> t.List[types.ResponseDict]: """ Get list of units of measure available on the platform. Currently, "mm" and "inch". """ return self._request("GET", "units/")
Get list of units of measure available on the platform. Currently, "mm" and "inch".
def get_countries(self) ‑> List[Dict[str, Any]]
-
Expand source code
def get_countries(self) -> t.List[types.ResponseDict]: """ Get list of countries with codes and full names """ return self._request("GET", "countries/")
Get list of countries with codes and full names
def get_currencies(self) ‑> List[str]
-
Expand source code
def get_currencies(self) -> t.List[str]: """ Get list of currencies available on the platform """ return self._request("GET", "currencies/")
Get list of currencies available on the platform
def get_materials(self) ‑> List[Dict[str, Any]]
-
Expand source code
def get_materials(self) -> t.List[types.ResponseDict]: return self._request("GET", "materials/")
def get_tax_types(self) ‑> List[str]
-
Expand source code
def get_tax_types(self) -> t.List[str]: return self._request("GET", "tax-types/")