universal-mcp-applications 0.1.33__py3-none-any.whl → 0.1.39rc8__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 universal-mcp-applications might be problematic. Click here for more details.
- universal_mcp/applications/ahrefs/app.py +92 -238
- universal_mcp/applications/airtable/app.py +23 -122
- universal_mcp/applications/apollo/app.py +122 -475
- universal_mcp/applications/asana/app.py +605 -1755
- universal_mcp/applications/aws_s3/app.py +36 -103
- universal_mcp/applications/bill/app.py +644 -2055
- universal_mcp/applications/box/app.py +1246 -4159
- universal_mcp/applications/braze/app.py +410 -1476
- universal_mcp/applications/browser_use/README.md +15 -1
- universal_mcp/applications/browser_use/__init__.py +1 -0
- universal_mcp/applications/browser_use/app.py +86 -24
- universal_mcp/applications/cal_com_v2/app.py +207 -625
- universal_mcp/applications/calendly/app.py +103 -242
- universal_mcp/applications/canva/app.py +75 -140
- universal_mcp/applications/clickup/app.py +331 -798
- universal_mcp/applications/coda/app.py +240 -520
- universal_mcp/applications/confluence/app.py +497 -1285
- universal_mcp/applications/contentful/app.py +36 -151
- universal_mcp/applications/crustdata/app.py +42 -121
- universal_mcp/applications/dialpad/app.py +451 -924
- universal_mcp/applications/digitalocean/app.py +2071 -6082
- universal_mcp/applications/domain_checker/app.py +3 -54
- universal_mcp/applications/e2b/app.py +14 -64
- universal_mcp/applications/elevenlabs/app.py +9 -47
- universal_mcp/applications/exa/README.md +8 -4
- universal_mcp/applications/exa/app.py +408 -186
- universal_mcp/applications/falai/app.py +24 -101
- universal_mcp/applications/figma/app.py +91 -175
- universal_mcp/applications/file_system/app.py +2 -13
- universal_mcp/applications/firecrawl/app.py +186 -163
- universal_mcp/applications/fireflies/app.py +59 -281
- universal_mcp/applications/fpl/app.py +92 -529
- universal_mcp/applications/fpl/utils/fixtures.py +15 -49
- universal_mcp/applications/fpl/utils/helper.py +25 -89
- universal_mcp/applications/fpl/utils/league_utils.py +20 -64
- universal_mcp/applications/ghost_content/app.py +66 -175
- universal_mcp/applications/github/app.py +28 -65
- universal_mcp/applications/gong/app.py +140 -300
- universal_mcp/applications/google_calendar/app.py +26 -78
- universal_mcp/applications/google_docs/app.py +98 -202
- universal_mcp/applications/google_drive/app.py +194 -793
- universal_mcp/applications/google_gemini/app.py +27 -62
- universal_mcp/applications/google_mail/README.md +1 -0
- universal_mcp/applications/google_mail/app.py +93 -214
- universal_mcp/applications/google_searchconsole/app.py +25 -58
- universal_mcp/applications/google_sheet/app.py +171 -624
- universal_mcp/applications/google_sheet/helper.py +26 -53
- universal_mcp/applications/hashnode/app.py +57 -269
- universal_mcp/applications/heygen/app.py +77 -155
- universal_mcp/applications/http_tools/app.py +10 -32
- universal_mcp/applications/hubspot/README.md +1 -1
- universal_mcp/applications/hubspot/app.py +7508 -99
- universal_mcp/applications/jira/app.py +2419 -8334
- universal_mcp/applications/klaviyo/app.py +737 -1619
- universal_mcp/applications/linkedin/README.md +5 -0
- universal_mcp/applications/linkedin/app.py +332 -227
- universal_mcp/applications/mailchimp/app.py +696 -1851
- universal_mcp/applications/markitdown/app.py +8 -20
- universal_mcp/applications/miro/app.py +333 -815
- universal_mcp/applications/ms_teams/app.py +85 -207
- universal_mcp/applications/neon/app.py +144 -250
- universal_mcp/applications/notion/app.py +36 -51
- universal_mcp/applications/onedrive/app.py +26 -48
- universal_mcp/applications/openai/app.py +42 -165
- universal_mcp/applications/outlook/README.md +22 -9
- universal_mcp/applications/outlook/app.py +403 -141
- universal_mcp/applications/perplexity/README.md +2 -1
- universal_mcp/applications/perplexity/app.py +162 -20
- universal_mcp/applications/pipedrive/app.py +1021 -3331
- universal_mcp/applications/posthog/app.py +272 -541
- universal_mcp/applications/reddit/app.py +61 -160
- universal_mcp/applications/resend/app.py +41 -107
- universal_mcp/applications/retell/app.py +23 -50
- universal_mcp/applications/rocketlane/app.py +250 -963
- universal_mcp/applications/scraper/app.py +67 -125
- universal_mcp/applications/semanticscholar/app.py +36 -78
- universal_mcp/applications/semrush/app.py +43 -77
- universal_mcp/applications/sendgrid/app.py +826 -1576
- universal_mcp/applications/sentry/app.py +444 -1079
- universal_mcp/applications/serpapi/app.py +40 -143
- universal_mcp/applications/sharepoint/app.py +27 -49
- universal_mcp/applications/shopify/app.py +1743 -4479
- universal_mcp/applications/shortcut/app.py +272 -534
- universal_mcp/applications/slack/app.py +41 -123
- universal_mcp/applications/spotify/app.py +206 -405
- universal_mcp/applications/supabase/app.py +174 -283
- universal_mcp/applications/tavily/app.py +2 -2
- universal_mcp/applications/trello/app.py +853 -2816
- universal_mcp/applications/twilio/app.py +14 -50
- universal_mcp/applications/twitter/api_segments/compliance_api.py +4 -14
- universal_mcp/applications/twitter/api_segments/dm_conversations_api.py +6 -18
- universal_mcp/applications/twitter/api_segments/likes_api.py +1 -3
- universal_mcp/applications/twitter/api_segments/lists_api.py +5 -15
- universal_mcp/applications/twitter/api_segments/trends_api.py +1 -3
- universal_mcp/applications/twitter/api_segments/tweets_api.py +9 -31
- universal_mcp/applications/twitter/api_segments/usage_api.py +1 -5
- universal_mcp/applications/twitter/api_segments/users_api.py +14 -42
- universal_mcp/applications/whatsapp/app.py +35 -186
- universal_mcp/applications/whatsapp/audio.py +2 -6
- universal_mcp/applications/whatsapp/whatsapp.py +17 -51
- universal_mcp/applications/whatsapp_business/app.py +86 -299
- universal_mcp/applications/wrike/app.py +80 -153
- universal_mcp/applications/yahoo_finance/app.py +19 -65
- universal_mcp/applications/youtube/app.py +120 -306
- universal_mcp/applications/zenquotes/app.py +3 -3
- {universal_mcp_applications-0.1.33.dist-info → universal_mcp_applications-0.1.39rc8.dist-info}/METADATA +4 -2
- {universal_mcp_applications-0.1.33.dist-info → universal_mcp_applications-0.1.39rc8.dist-info}/RECORD +109 -113
- {universal_mcp_applications-0.1.33.dist-info → universal_mcp_applications-0.1.39rc8.dist-info}/WHEEL +1 -1
- universal_mcp/applications/hubspot/api_segments/__init__.py +0 -0
- universal_mcp/applications/hubspot/api_segments/api_segment_base.py +0 -54
- universal_mcp/applications/hubspot/api_segments/crm_api.py +0 -7337
- universal_mcp/applications/hubspot/api_segments/marketing_api.py +0 -1467
- {universal_mcp_applications-0.1.33.dist-info → universal_mcp_applications-0.1.39rc8.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
from typing import Any
|
|
2
|
-
|
|
3
2
|
from universal_mcp.applications.application import APIApplication
|
|
4
3
|
from universal_mcp.integrations import Integration
|
|
5
4
|
|
|
@@ -11,15 +10,9 @@ class CrustdataApp(APIApplication):
|
|
|
11
10
|
|
|
12
11
|
def _get_headers(self) -> dict[str, Any]:
|
|
13
12
|
api_key = self.integration.get_credentials().get("api_key")
|
|
14
|
-
return {
|
|
15
|
-
"Authorization": f"Token {api_key}",
|
|
16
|
-
"Content-Type": "application/json",
|
|
17
|
-
"Accept": "application/json",
|
|
18
|
-
}
|
|
13
|
+
return {"Authorization": f"Token {api_key}", "Content-Type": "application/json", "Accept": "application/json"}
|
|
19
14
|
|
|
20
|
-
def screen_companies(
|
|
21
|
-
self, metrics, filters, offset, count, sorts
|
|
22
|
-
) -> dict[str, Any]:
|
|
15
|
+
async def screen_companies(self, metrics, filters, offset, count, sorts) -> dict[str, Any]:
|
|
23
16
|
"""
|
|
24
17
|
Screens companies based on specified metrics, filters, sorting, and pagination parameters, and returns the result as a JSON-compatible dictionary.
|
|
25
18
|
|
|
@@ -50,21 +43,15 @@ class CrustdataApp(APIApplication):
|
|
|
50
43
|
raise ValueError("Missing required parameter 'count'")
|
|
51
44
|
if sorts is None:
|
|
52
45
|
raise ValueError("Missing required parameter 'sorts'")
|
|
53
|
-
request_body = {
|
|
54
|
-
"metrics": metrics,
|
|
55
|
-
"filters": filters,
|
|
56
|
-
"offset": offset,
|
|
57
|
-
"count": count,
|
|
58
|
-
"sorts": sorts,
|
|
59
|
-
}
|
|
46
|
+
request_body = {"metrics": metrics, "filters": filters, "offset": offset, "count": count, "sorts": sorts}
|
|
60
47
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
61
48
|
url = f"{self.base_url}/screener/screen/"
|
|
62
49
|
query_params = {}
|
|
63
|
-
response = self.
|
|
50
|
+
response = await self._apost(url, data=request_body, params=query_params)
|
|
64
51
|
response.raise_for_status()
|
|
65
52
|
return response.json()
|
|
66
53
|
|
|
67
|
-
def get_headcount_timeseries(self, filters, offset, count, sorts) -> dict[str, Any]:
|
|
54
|
+
async def get_headcount_timeseries(self, filters, offset, count, sorts) -> dict[str, Any]:
|
|
68
55
|
"""
|
|
69
56
|
Retrieve headcount timeseries data from the data lab endpoint using the provided filters, pagination, and sorting options.
|
|
70
57
|
|
|
@@ -92,22 +79,15 @@ class CrustdataApp(APIApplication):
|
|
|
92
79
|
raise ValueError("Missing required parameter 'count'")
|
|
93
80
|
if sorts is None:
|
|
94
81
|
raise ValueError("Missing required parameter 'sorts'")
|
|
95
|
-
request_body = {
|
|
96
|
-
"filters": filters,
|
|
97
|
-
"offset": offset,
|
|
98
|
-
"count": count,
|
|
99
|
-
"sorts": sorts,
|
|
100
|
-
}
|
|
82
|
+
request_body = {"filters": filters, "offset": offset, "count": count, "sorts": sorts}
|
|
101
83
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
102
84
|
url = f"{self.base_url}/data_lab/headcount_timeseries/"
|
|
103
85
|
query_params = {}
|
|
104
|
-
response = self.
|
|
86
|
+
response = await self._apost(url, data=request_body, params=query_params)
|
|
105
87
|
response.raise_for_status()
|
|
106
88
|
return response.json()
|
|
107
89
|
|
|
108
|
-
def get_headcount_by_facet_timeseries(
|
|
109
|
-
self, filters, offset, count, sorts
|
|
110
|
-
) -> dict[str, Any]:
|
|
90
|
+
async def get_headcount_by_facet_timeseries(self, filters, offset, count, sorts) -> dict[str, Any]:
|
|
111
91
|
"""
|
|
112
92
|
Retrieves headcount timeseries data aggregated by specified facets using provided filters and sorting options.
|
|
113
93
|
|
|
@@ -135,22 +115,15 @@ class CrustdataApp(APIApplication):
|
|
|
135
115
|
raise ValueError("Missing required parameter 'count'")
|
|
136
116
|
if sorts is None:
|
|
137
117
|
raise ValueError("Missing required parameter 'sorts'")
|
|
138
|
-
request_body = {
|
|
139
|
-
"filters": filters,
|
|
140
|
-
"offset": offset,
|
|
141
|
-
"count": count,
|
|
142
|
-
"sorts": sorts,
|
|
143
|
-
}
|
|
118
|
+
request_body = {"filters": filters, "offset": offset, "count": count, "sorts": sorts}
|
|
144
119
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
145
120
|
url = f"{self.base_url}/data_lab/headcount_by_facet_timeseries/"
|
|
146
121
|
query_params = {}
|
|
147
|
-
response = self.
|
|
122
|
+
response = await self._apost(url, data=request_body, params=query_params)
|
|
148
123
|
response.raise_for_status()
|
|
149
124
|
return response.json()
|
|
150
125
|
|
|
151
|
-
def get_funding_milestone_timeseries(
|
|
152
|
-
self, filters, offset, count, sorts
|
|
153
|
-
) -> dict[str, Any]:
|
|
126
|
+
async def get_funding_milestone_timeseries(self, filters, offset, count, sorts) -> dict[str, Any]:
|
|
154
127
|
"""
|
|
155
128
|
Retrieves a time series of funding milestone data based on specified filters, pagination, and sorting options.
|
|
156
129
|
|
|
@@ -178,22 +151,15 @@ class CrustdataApp(APIApplication):
|
|
|
178
151
|
raise ValueError("Missing required parameter 'count'")
|
|
179
152
|
if sorts is None:
|
|
180
153
|
raise ValueError("Missing required parameter 'sorts'")
|
|
181
|
-
request_body = {
|
|
182
|
-
"filters": filters,
|
|
183
|
-
"offset": offset,
|
|
184
|
-
"count": count,
|
|
185
|
-
"sorts": sorts,
|
|
186
|
-
}
|
|
154
|
+
request_body = {"filters": filters, "offset": offset, "count": count, "sorts": sorts}
|
|
187
155
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
188
156
|
url = f"{self.base_url}/data_lab/funding_milestone_timeseries/"
|
|
189
157
|
query_params = {}
|
|
190
|
-
response = self.
|
|
158
|
+
response = await self._apost(url, data=request_body, params=query_params)
|
|
191
159
|
response.raise_for_status()
|
|
192
160
|
return response.json()
|
|
193
161
|
|
|
194
|
-
def get_decision_makers(
|
|
195
|
-
self, filters, offset, count, sorts, decision_maker_titles
|
|
196
|
-
) -> dict[str, Any]:
|
|
162
|
+
async def get_decision_makers(self, filters, offset, count, sorts, decision_maker_titles) -> dict[str, Any]:
|
|
197
163
|
"""
|
|
198
164
|
Retrieves decision makers based on specified filters and parameters.
|
|
199
165
|
|
|
@@ -234,11 +200,11 @@ class CrustdataApp(APIApplication):
|
|
|
234
200
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
235
201
|
url = f"{self.base_url}/data_lab/decision_makers/"
|
|
236
202
|
query_params = {}
|
|
237
|
-
response = self.
|
|
203
|
+
response = await self._apost(url, data=request_body, params=query_params)
|
|
238
204
|
response.raise_for_status()
|
|
239
205
|
return response.json()
|
|
240
206
|
|
|
241
|
-
def get_web_traffic(self, filters, offset, count, sorts) -> dict[str, Any]:
|
|
207
|
+
async def get_web_traffic(self, filters, offset, count, sorts) -> dict[str, Any]:
|
|
242
208
|
"""
|
|
243
209
|
Retrieves web traffic data based on provided filters, pagination, and sorting criteria.
|
|
244
210
|
|
|
@@ -266,20 +232,15 @@ class CrustdataApp(APIApplication):
|
|
|
266
232
|
raise ValueError("Missing required parameter 'count'")
|
|
267
233
|
if sorts is None:
|
|
268
234
|
raise ValueError("Missing required parameter 'sorts'")
|
|
269
|
-
request_body = {
|
|
270
|
-
"filters": filters,
|
|
271
|
-
"offset": offset,
|
|
272
|
-
"count": count,
|
|
273
|
-
"sorts": sorts,
|
|
274
|
-
}
|
|
235
|
+
request_body = {"filters": filters, "offset": offset, "count": count, "sorts": sorts}
|
|
275
236
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
276
237
|
url = f"{self.base_url}/data_lab/webtraffic/"
|
|
277
238
|
query_params = {}
|
|
278
|
-
response = self.
|
|
239
|
+
response = await self._apost(url, data=request_body, params=query_params)
|
|
279
240
|
response.raise_for_status()
|
|
280
241
|
return response.json()
|
|
281
242
|
|
|
282
|
-
def get_investor_portfolio(self, investor_name) -> dict[str, Any]:
|
|
243
|
+
async def get_investor_portfolio(self, investor_name) -> dict[str, Any]:
|
|
283
244
|
"""
|
|
284
245
|
Retrieves the investment portfolio information for a specified investor.
|
|
285
246
|
|
|
@@ -299,16 +260,12 @@ class CrustdataApp(APIApplication):
|
|
|
299
260
|
if investor_name is None:
|
|
300
261
|
raise ValueError("Missing required parameter 'investor_name'")
|
|
301
262
|
url = f"{self.base_url}/data_lab/investor_portfolio"
|
|
302
|
-
query_params = {
|
|
303
|
-
|
|
304
|
-
}
|
|
305
|
-
response = self._get(url, params=query_params)
|
|
263
|
+
query_params = {k: v for k, v in [("investor_name", investor_name)] if v is not None}
|
|
264
|
+
response = await self._aget(url, params=query_params)
|
|
306
265
|
response.raise_for_status()
|
|
307
266
|
return response.json()
|
|
308
267
|
|
|
309
|
-
def get_job_listings(
|
|
310
|
-
self, tickers, dataset, filters, offset, count, sorts
|
|
311
|
-
) -> dict[str, Any]:
|
|
268
|
+
async def get_job_listings(self, tickers, dataset, filters, offset, count, sorts) -> dict[str, Any]:
|
|
312
269
|
"""
|
|
313
270
|
Retrieves job listings data based on specified parameters.
|
|
314
271
|
|
|
@@ -342,22 +299,15 @@ class CrustdataApp(APIApplication):
|
|
|
342
299
|
raise ValueError("Missing required parameter 'count'")
|
|
343
300
|
if sorts is None:
|
|
344
301
|
raise ValueError("Missing required parameter 'sorts'")
|
|
345
|
-
request_body = {
|
|
346
|
-
"tickers": tickers,
|
|
347
|
-
"dataset": dataset,
|
|
348
|
-
"filters": filters,
|
|
349
|
-
"offset": offset,
|
|
350
|
-
"count": count,
|
|
351
|
-
"sorts": sorts,
|
|
352
|
-
}
|
|
302
|
+
request_body = {"tickers": tickers, "dataset": dataset, "filters": filters, "offset": offset, "count": count, "sorts": sorts}
|
|
353
303
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
354
304
|
url = f"{self.base_url}/data_lab/job_listings/Table/"
|
|
355
305
|
query_params = {}
|
|
356
|
-
response = self.
|
|
306
|
+
response = await self._apost(url, data=request_body, params=query_params)
|
|
357
307
|
response.raise_for_status()
|
|
358
308
|
return response.json()
|
|
359
309
|
|
|
360
|
-
def search_persons(self, job_id) -> dict[str, Any]:
|
|
310
|
+
async def search_persons(self, job_id) -> dict[str, Any]:
|
|
361
311
|
"""
|
|
362
312
|
Submits a search request for persons associated with a given asynchronous job and returns the search results as a dictionary.
|
|
363
313
|
|
|
@@ -376,17 +326,15 @@ class CrustdataApp(APIApplication):
|
|
|
376
326
|
"""
|
|
377
327
|
if job_id is None:
|
|
378
328
|
raise ValueError("Missing required parameter 'job_id'")
|
|
379
|
-
request_body = {
|
|
380
|
-
"job_id": job_id,
|
|
381
|
-
}
|
|
329
|
+
request_body = {"job_id": job_id}
|
|
382
330
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
383
331
|
url = f"{self.base_url}/screener/person/search"
|
|
384
332
|
query_params = {}
|
|
385
|
-
response = self.
|
|
333
|
+
response = await self._apost(url, data=request_body, params=query_params)
|
|
386
334
|
response.raise_for_status()
|
|
387
335
|
return response.json()
|
|
388
336
|
|
|
389
|
-
def search_companies(self, filters, page) -> dict[str, Any]:
|
|
337
|
+
async def search_companies(self, filters, page) -> dict[str, Any]:
|
|
390
338
|
"""
|
|
391
339
|
Searches for companies using specified filters and pagination parameters.
|
|
392
340
|
|
|
@@ -408,20 +356,15 @@ class CrustdataApp(APIApplication):
|
|
|
408
356
|
raise ValueError("Missing required parameter 'filters'")
|
|
409
357
|
if page is None:
|
|
410
358
|
raise ValueError("Missing required parameter 'page'")
|
|
411
|
-
request_body = {
|
|
412
|
-
"filters": filters,
|
|
413
|
-
"page": page,
|
|
414
|
-
}
|
|
359
|
+
request_body = {"filters": filters, "page": page}
|
|
415
360
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
416
361
|
url = f"{self.base_url}/screener/company/search"
|
|
417
362
|
query_params = {}
|
|
418
|
-
response = self.
|
|
363
|
+
response = await self._apost(url, data=request_body, params=query_params)
|
|
419
364
|
response.raise_for_status()
|
|
420
365
|
return response.json()
|
|
421
366
|
|
|
422
|
-
def enrich_person(
|
|
423
|
-
self, linkedin_profile_url, enrich_realtime, fields
|
|
424
|
-
) -> dict[str, Any]:
|
|
367
|
+
async def enrich_person(self, linkedin_profile_url, enrich_realtime, fields) -> dict[str, Any]:
|
|
425
368
|
"""
|
|
426
369
|
Retrieves enriched person data from LinkedIn profile using the provided profile URL, enrichment mode, and requested fields.
|
|
427
370
|
|
|
@@ -449,18 +392,14 @@ class CrustdataApp(APIApplication):
|
|
|
449
392
|
url = f"{self.base_url}/screener/person/enrich"
|
|
450
393
|
query_params = {
|
|
451
394
|
k: v
|
|
452
|
-
for k, v in [
|
|
453
|
-
("linkedin_profile_url", linkedin_profile_url),
|
|
454
|
-
("enrich_realtime", enrich_realtime),
|
|
455
|
-
("fields", fields),
|
|
456
|
-
]
|
|
395
|
+
for k, v in [("linkedin_profile_url", linkedin_profile_url), ("enrich_realtime", enrich_realtime), ("fields", fields)]
|
|
457
396
|
if v is not None
|
|
458
397
|
}
|
|
459
|
-
response = self.
|
|
398
|
+
response = await self._aget(url, params=query_params)
|
|
460
399
|
response.raise_for_status()
|
|
461
400
|
return response.json()
|
|
462
401
|
|
|
463
|
-
def enrich_company(self, company_domain, enrich_realtime) -> dict[str, Any]:
|
|
402
|
+
async def enrich_company(self, company_domain, enrich_realtime) -> dict[str, Any]:
|
|
464
403
|
"""
|
|
465
404
|
Retrieves enriched company data using the provided company domain and enrichment mode.
|
|
466
405
|
|
|
@@ -483,19 +422,12 @@ class CrustdataApp(APIApplication):
|
|
|
483
422
|
if enrich_realtime is None:
|
|
484
423
|
raise ValueError("Missing required parameter 'enrich_realtime'")
|
|
485
424
|
url = f"{self.base_url}/screener/company"
|
|
486
|
-
query_params = {
|
|
487
|
-
|
|
488
|
-
for k, v in [
|
|
489
|
-
("company_domain", company_domain),
|
|
490
|
-
("enrich_realtime", enrich_realtime),
|
|
491
|
-
]
|
|
492
|
-
if v is not None
|
|
493
|
-
}
|
|
494
|
-
response = self._get(url, params=query_params)
|
|
425
|
+
query_params = {k: v for k, v in [("company_domain", company_domain), ("enrich_realtime", enrich_realtime)] if v is not None}
|
|
426
|
+
response = await self._aget(url, params=query_params)
|
|
495
427
|
response.raise_for_status()
|
|
496
428
|
return response.json()
|
|
497
429
|
|
|
498
|
-
def get_linked_in_posts(self, company_linkedin_url) -> dict[str, Any]:
|
|
430
|
+
async def get_linked_in_posts(self, company_linkedin_url) -> dict[str, Any]:
|
|
499
431
|
"""
|
|
500
432
|
Fetches LinkedIn posts for a specified company using its LinkedIn URL.
|
|
501
433
|
|
|
@@ -515,18 +447,12 @@ class CrustdataApp(APIApplication):
|
|
|
515
447
|
if company_linkedin_url is None:
|
|
516
448
|
raise ValueError("Missing required parameter 'company_linkedin_url'")
|
|
517
449
|
url = f"{self.base_url}/screener/linkedin_posts"
|
|
518
|
-
query_params = {
|
|
519
|
-
|
|
520
|
-
for k, v in [("company_linkedin_url", company_linkedin_url)]
|
|
521
|
-
if v is not None
|
|
522
|
-
}
|
|
523
|
-
response = self._get(url, params=query_params)
|
|
450
|
+
query_params = {k: v for k, v in [("company_linkedin_url", company_linkedin_url)] if v is not None}
|
|
451
|
+
response = await self._aget(url, params=query_params)
|
|
524
452
|
response.raise_for_status()
|
|
525
453
|
return response.json()
|
|
526
454
|
|
|
527
|
-
def search_linked_in_posts(
|
|
528
|
-
self, keyword, page, sort_by, date_posted
|
|
529
|
-
) -> dict[str, Any]:
|
|
455
|
+
async def search_linked_in_posts(self, keyword, page, sort_by, date_posted) -> dict[str, Any]:
|
|
530
456
|
"""
|
|
531
457
|
Searches LinkedIn posts using the provided keyword and filters, returning the search results as a dictionary.
|
|
532
458
|
|
|
@@ -554,16 +480,11 @@ class CrustdataApp(APIApplication):
|
|
|
554
480
|
raise ValueError("Missing required parameter 'sort_by'")
|
|
555
481
|
if date_posted is None:
|
|
556
482
|
raise ValueError("Missing required parameter 'date_posted'")
|
|
557
|
-
request_body = {
|
|
558
|
-
"keyword": keyword,
|
|
559
|
-
"page": page,
|
|
560
|
-
"sort_by": sort_by,
|
|
561
|
-
"date_posted": date_posted,
|
|
562
|
-
}
|
|
483
|
+
request_body = {"keyword": keyword, "page": page, "sort_by": sort_by, "date_posted": date_posted}
|
|
563
484
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
564
485
|
url = f"{self.base_url}/screener/linkedin_posts/keyword_search/"
|
|
565
486
|
query_params = {}
|
|
566
|
-
response = self.
|
|
487
|
+
response = await self._apost(url, data=request_body, params=query_params)
|
|
567
488
|
response.raise_for_status()
|
|
568
489
|
return response.json()
|
|
569
490
|
|