amochka 0.4.3__py3-none-any.whl → 0.4.4__py3-none-any.whl
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.
- amochka/__init__.py +1 -1
- amochka/client.py +9 -4
- {amochka-0.4.3.dist-info → amochka-0.4.4.dist-info}/METADATA +1 -1
- {amochka-0.4.3.dist-info → amochka-0.4.4.dist-info}/RECORD +6 -6
- {amochka-0.4.3.dist-info → amochka-0.4.4.dist-info}/WHEEL +0 -0
- {amochka-0.4.3.dist-info → amochka-0.4.4.dist-info}/top_level.txt +0 -0
amochka/__init__.py
CHANGED
amochka/client.py
CHANGED
|
@@ -1228,6 +1228,8 @@ class AmoCRMClient:
|
|
|
1228
1228
|
if end_ts is not None:
|
|
1229
1229
|
params["filter[updated_at][to]"] = end_ts
|
|
1230
1230
|
note_type_param = self._format_filter_values(note_type)
|
|
1231
|
+
if isinstance(note_type_param, (list, tuple, set)):
|
|
1232
|
+
note_type_param = ",".join(note_type_param)
|
|
1231
1233
|
if note_type_param:
|
|
1232
1234
|
params["filter[note_type]"] = note_type_param
|
|
1233
1235
|
entity_param = self._format_filter_values(entity_ids)
|
|
@@ -1597,8 +1599,11 @@ class AmoCRMClient:
|
|
|
1597
1599
|
"page": 1,
|
|
1598
1600
|
"limit": 250
|
|
1599
1601
|
}
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
+
note_type_param = self._format_filter_values(note_type)
|
|
1603
|
+
if isinstance(note_type_param, (list, tuple, set)):
|
|
1604
|
+
note_type_param = ",".join(note_type_param)
|
|
1605
|
+
if note_type_param:
|
|
1606
|
+
params["filter[note_type]"] = note_type_param
|
|
1602
1607
|
if extra_params:
|
|
1603
1608
|
params.update(extra_params)
|
|
1604
1609
|
|
|
@@ -1606,7 +1611,7 @@ class AmoCRMClient:
|
|
|
1606
1611
|
while True:
|
|
1607
1612
|
response = self._make_request("GET", endpoint, params=params)
|
|
1608
1613
|
if not response:
|
|
1609
|
-
self.logger.
|
|
1614
|
+
self.logger.debug(f"Empty response for notes {entity} {entity_id}, stopping pagination")
|
|
1610
1615
|
break
|
|
1611
1616
|
if response and "_embedded" in response and "notes" in response["_embedded"]:
|
|
1612
1617
|
notes.extend(response["_embedded"]["notes"])
|
|
@@ -1690,7 +1695,7 @@ class AmoCRMClient:
|
|
|
1690
1695
|
while True:
|
|
1691
1696
|
response = self._make_request("GET", "/api/v4/events", params=params)
|
|
1692
1697
|
if not response:
|
|
1693
|
-
self.logger.
|
|
1698
|
+
self.logger.debug(f"Empty response for events {entity} {entity_id}, stopping pagination")
|
|
1694
1699
|
break
|
|
1695
1700
|
if response and "_embedded" in response and "events" in response["_embedded"]:
|
|
1696
1701
|
events.extend(response["_embedded"]["events"])
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
amochka/__init__.py,sha256=
|
|
2
|
-
amochka/client.py,sha256=
|
|
1
|
+
amochka/__init__.py,sha256=L2D_slwPlqEmazAVuCBtq75YKtSwIwGQJDlcrpqfOmI,925
|
|
2
|
+
amochka/client.py,sha256=tjWCkKaosmYV3D1CM8w9PiIAOC_Qqb4Eipfczv4F1QM,89481
|
|
3
3
|
amochka/errors.py,sha256=Rg4U9srjboQwgU3wwhAed0p3vGcc0ZhuyKHIDhYFnp8,1371
|
|
4
4
|
amochka/etl.py,sha256=tzdGPRGxR49aSAjLksic-FqechvDUTfK8ZUUJGuIU7M,8960
|
|
5
5
|
etl/__init__.py,sha256=bp9fPqbKlOc7xzs27diHEvysy1FgBrwlpX6GnR6GL9U,255
|
|
@@ -9,7 +9,7 @@ etl/loaders.py,sha256=x8PcDQoq2kjbd52H2VzKKz5vHzyD6DXSsb9X0foPX_U,31941
|
|
|
9
9
|
etl/run_etl.py,sha256=LxKQLE_yUPkg7kaFmmMxrdggz27puS1VdV9NTna9e4Q,26665
|
|
10
10
|
etl/transformers.py,sha256=OwYJ_9l3oqvy2Y3-umXjAGweOIqlfRI0iSiCFPrcQ8E,17867
|
|
11
11
|
etl/migrations/001_create_tables.sql,sha256=YrSaZjpofC1smjYx0bM4eHQumboruIBY3fwRDlJLLSo,15749
|
|
12
|
-
amochka-0.4.
|
|
13
|
-
amochka-0.4.
|
|
14
|
-
amochka-0.4.
|
|
15
|
-
amochka-0.4.
|
|
12
|
+
amochka-0.4.4.dist-info/METADATA,sha256=St1Dle9yx49gdUNz104Af6akTBhAF_KnZ8QL2BdTN94,7530
|
|
13
|
+
amochka-0.4.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
14
|
+
amochka-0.4.4.dist-info/top_level.txt,sha256=grRX8aLFG-yYKPsAqCD6sUBmdLSQeOMHsc9Dl6S7Lzo,12
|
|
15
|
+
amochka-0.4.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|