apitable 1.4.1__tar.gz → 2.0.0b4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. {apitable-1.4.1 → apitable-2.0.0b4}/PKG-INFO +1 -1
  2. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/datasheet/datasheet.py +12 -1
  3. {apitable-1.4.1 → apitable-2.0.0b4}/pyproject.toml +1 -1
  4. {apitable-1.4.1 → apitable-2.0.0b4}/LICENSE +0 -0
  5. {apitable-1.4.1 → apitable-2.0.0b4}/README.md +0 -0
  6. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/__init__.py +0 -0
  7. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/apitable.py +0 -0
  8. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/const.py +0 -0
  9. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/datasheet/__init__.py +0 -0
  10. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/datasheet/datasheet_manager.py +0 -0
  11. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/datasheet/field_manager.py +0 -0
  12. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/datasheet/query_set.py +0 -0
  13. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/datasheet/record.py +0 -0
  14. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/datasheet/record_manager.py +0 -0
  15. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/datasheet/view_manager.py +0 -0
  16. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/exceptions.py +0 -0
  17. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/node/__init__.py +0 -0
  18. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/node/node_manager.py +0 -0
  19. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/request.py +0 -0
  20. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/space/__init__.py +0 -0
  21. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/space/space.py +0 -0
  22. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/space/space_manager.py +0 -0
  23. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/types/__init__.py +0 -0
  24. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/types/embedlink.py +0 -0
  25. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/types/field.py +0 -0
  26. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/types/node.py +0 -0
  27. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/types/record.py +0 -0
  28. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/types/response.py +0 -0
  29. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/types/space.py +0 -0
  30. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/types/unit_model.py +0 -0
  31. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/types/view.py +0 -0
  32. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/unit/__init__.py +0 -0
  33. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/unit/member.py +0 -0
  34. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/unit/role.py +0 -0
  35. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/unit/team.py +0 -0
  36. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/unit/unit.py +0 -0
  37. {apitable-1.4.1 → apitable-2.0.0b4}/apitable/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apitable
3
- Version: 1.4.1
3
+ Version: 2.0.0b4
4
4
  Summary: APITable OpenAPI Python SDK
5
5
  Author: APITable Ltd.
6
6
  Author-email: dev@apitable.com
@@ -57,6 +57,11 @@ class Datasheet:
57
57
  return urljoin(self.apitable.api_base,
58
58
  f"/fusion/v1/datasheets/{self.id}/records")
59
59
 
60
+ @property
61
+ def _record_api_endpoint_v3(self):
62
+ return urljoin(self.apitable.api_base,
63
+ f"/fusion/v3/datasheets/{self.id}/records")
64
+
60
65
  @property
61
66
  @timed_lru_cache(seconds=300)
62
67
  def fields(self):
@@ -137,6 +142,12 @@ class Datasheet:
137
142
  """
138
143
  Paginate to get data
139
144
  """
145
+
146
+ is_v3 = bool(kwargs.get("isV3", False))
147
+ endpoint = self._record_api_endpoint
148
+ if is_v3:
149
+ endpoint = self._record_api_endpoint_v3
150
+
140
151
  params = {}
141
152
  for key in kwargs:
142
153
  if key in API_GET_DATASHEET_QS_SET:
@@ -147,7 +158,7 @@ class Datasheet:
147
158
  else:
148
159
  raise ErrorSortParams('The format of the sort parameter is incorrect')
149
160
  params.update({key: params_value})
150
- resp = self.apitable.request.get(self._record_api_endpoint, params=params)
161
+ resp = self.apitable.request.get(endpoint, params=params)
151
162
  return handle_response(resp, GETRecordResponse)
152
163
 
153
164
  def get_records_all(self, **kwargs) -> List[RawRecord]:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "apitable"
3
- version = "1.4.1"
3
+ version = "2.0.0-beta.4"
4
4
  description = "APITable OpenAPI Python SDK"
5
5
  authors = ["APITable Ltd. <dev@apitable.com>"]
6
6
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes
File without changes