ingestr 0.14.8__py3-none-any.whl → 0.14.9__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.
Potentially problematic release.
This version of ingestr might be problematic. Click here for more details.
- ingestr/src/buildinfo.py +1 -1
- ingestr/src/freshdesk/freshdesk_client.py +9 -1
- {ingestr-0.14.8.dist-info → ingestr-0.14.9.dist-info}/METADATA +1 -1
- {ingestr-0.14.8.dist-info → ingestr-0.14.9.dist-info}/RECORD +7 -7
- {ingestr-0.14.8.dist-info → ingestr-0.14.9.dist-info}/WHEEL +0 -0
- {ingestr-0.14.8.dist-info → ingestr-0.14.9.dist-info}/entry_points.txt +0 -0
- {ingestr-0.14.8.dist-info → ingestr-0.14.9.dist-info}/licenses/LICENSE.md +0 -0
ingestr/src/buildinfo.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
version = "v0.14.
|
|
1
|
+
version = "v0.14.9"
|
|
@@ -10,6 +10,8 @@ from dlt.sources.helpers import requests
|
|
|
10
10
|
|
|
11
11
|
from ingestr.src.errors import HTTPError
|
|
12
12
|
|
|
13
|
+
TICKETS_QUERY_MAX_PAGE = 10
|
|
14
|
+
|
|
13
15
|
|
|
14
16
|
class FreshdeskClient:
|
|
15
17
|
"""
|
|
@@ -85,6 +87,8 @@ class FreshdeskClient:
|
|
|
85
87
|
if query is not None:
|
|
86
88
|
query = query.replace('"', "").strip()
|
|
87
89
|
|
|
90
|
+
is_tickets_query = query and endpoint == "tickets"
|
|
91
|
+
|
|
88
92
|
while True:
|
|
89
93
|
# Construct the URL for the specific endpoint
|
|
90
94
|
url = f"{self.base_url}/{endpoint}"
|
|
@@ -99,7 +103,7 @@ class FreshdeskClient:
|
|
|
99
103
|
|
|
100
104
|
params[param_key] = start_date.to_iso8601_string()
|
|
101
105
|
|
|
102
|
-
if
|
|
106
|
+
if is_tickets_query:
|
|
103
107
|
url = f"{self.base_url}/search/tickets"
|
|
104
108
|
params = {
|
|
105
109
|
"query": f'"{query}"',
|
|
@@ -127,3 +131,7 @@ class FreshdeskClient:
|
|
|
127
131
|
break
|
|
128
132
|
yield filtered_data
|
|
129
133
|
page += 1
|
|
134
|
+
|
|
135
|
+
# https://developers.freshdesk.com/api/#filter_tickets
|
|
136
|
+
if is_tickets_query and page > TICKETS_QUERY_MAX_PAGE:
|
|
137
|
+
break
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ingestr
|
|
3
|
-
Version: 0.14.
|
|
3
|
+
Version: 0.14.9
|
|
4
4
|
Summary: ingestr is a command-line application that ingests data from various sources and stores them in any database.
|
|
5
5
|
Project-URL: Homepage, https://github.com/bruin-data/ingestr
|
|
6
6
|
Project-URL: Issues, https://github.com/bruin-data/ingestr/issues
|
|
@@ -2,7 +2,7 @@ ingestr/conftest.py,sha256=OE2yxeTCosS9CUFVuqNypm-2ftYvVBeeq7egm3878cI,1981
|
|
|
2
2
|
ingestr/main.py,sha256=qo0g3wCFl8a_1jUwXagX8L1Q8PKKQlTF7md9pfnzW0Y,27155
|
|
3
3
|
ingestr/src/.gitignore,sha256=8cX1AZTSI0TcdZFGTmS_oyBjpfCzhOEt0DdAo2dFIY8,203
|
|
4
4
|
ingestr/src/blob.py,sha256=UUWMjHUuoR9xP1XZQ6UANQmnMVyDx3d0X4-2FQC271I,2138
|
|
5
|
-
ingestr/src/buildinfo.py,sha256=
|
|
5
|
+
ingestr/src/buildinfo.py,sha256=JVeLatT3zF_GlPLBMGJdol2FzZDg-jgHFHrlQBdckG8,20
|
|
6
6
|
ingestr/src/destinations.py,sha256=QtjE0AGs0WkPHaI2snWPHJ8HHi4lwXUBYLJPklz8Mvk,27772
|
|
7
7
|
ingestr/src/errors.py,sha256=fhJ2BxOqOsBfOxuTDKfZblvawBrPG3x_1VikIxMZBRI,874
|
|
8
8
|
ingestr/src/factory.py,sha256=03eGDe2rL6qyT5sGmTGZi-XIwJbbdoedE_KjW3ZF7QY,7661
|
|
@@ -61,7 +61,7 @@ ingestr/src/fluxx/helpers.py,sha256=zJmlQWwiv9snnLqTygiWVZy7-0rGi_K427hRUuZeHEM,
|
|
|
61
61
|
ingestr/src/frankfurter/__init__.py,sha256=gOdL8ZqgHHYZByjtfE3WX3BTRHdYqyn9FpQwzDHSAx0,5089
|
|
62
62
|
ingestr/src/frankfurter/helpers.py,sha256=SpRr992OcSf7IDI5y-ToUdO6m6sGpqFz59LTY0ojchI,1502
|
|
63
63
|
ingestr/src/freshdesk/__init__.py,sha256=OIP3GikA6BMh9sruU3jih-swdFNSposr48oQhy1WGNk,3145
|
|
64
|
-
ingestr/src/freshdesk/freshdesk_client.py,sha256=
|
|
64
|
+
ingestr/src/freshdesk/freshdesk_client.py,sha256=Fp2YBG3hMtR-t4XfjRjc7-wiUMHCIe9hnFhrGNNGwoA,5122
|
|
65
65
|
ingestr/src/freshdesk/settings.py,sha256=0Wr_OMnUZcTlry7BmALssLxD2yh686JW4moLNv12Jnw,409
|
|
66
66
|
ingestr/src/fundraiseup/__init__.py,sha256=q3TQeP1HdbWNeXFMq-0-BdSo82Fq4Io1OEYOY1cAYcU,1743
|
|
67
67
|
ingestr/src/fundraiseup/client.py,sha256=klU57l8iJ5NAS1nTb_4UyVAerbPWpTa8PMHlpp9Riz0,2453
|
|
@@ -180,8 +180,8 @@ ingestr/testdata/merge_expected.csv,sha256=DReHqWGnQMsf2PBv_Q2pfjsgvikYFnf1zYcQZ
|
|
|
180
180
|
ingestr/testdata/merge_part1.csv,sha256=Pw8Z9IDKcNU0qQHx1z6BUf4rF_-SxKGFOvymCt4OY9I,185
|
|
181
181
|
ingestr/testdata/merge_part2.csv,sha256=T_GiWxA81SN63_tMOIuemcvboEFeAmbKc7xRXvL9esw,287
|
|
182
182
|
ingestr/tests/unit/test_smartsheets.py,sha256=zf3DXT29Y4TH2lNPBFphdjlaelUUyPJcsW2UO68RzDs,4862
|
|
183
|
-
ingestr-0.14.
|
|
184
|
-
ingestr-0.14.
|
|
185
|
-
ingestr-0.14.
|
|
186
|
-
ingestr-0.14.
|
|
187
|
-
ingestr-0.14.
|
|
183
|
+
ingestr-0.14.9.dist-info/METADATA,sha256=xqQRDYjtnSD01hUyNk3jnTc-hjCfWd8CEsAPmx5XzUk,15265
|
|
184
|
+
ingestr-0.14.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
185
|
+
ingestr-0.14.9.dist-info/entry_points.txt,sha256=oPJy0KBnPWYjDtP1k8qwAihcTLHSZokSQvRAw_wtfJM,46
|
|
186
|
+
ingestr-0.14.9.dist-info/licenses/LICENSE.md,sha256=cW8wIhn8HFE-KLStDF9jHQ1O_ARWP3kTpk_-eOccL24,1075
|
|
187
|
+
ingestr-0.14.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|