universal-mcp-applications 0.1.30__py3-none-any.whl → 0.1.36rc1__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 +52 -198
- universal_mcp/applications/airtable/app.py +23 -122
- universal_mcp/applications/apollo/app.py +111 -464
- universal_mcp/applications/asana/app.py +417 -1567
- universal_mcp/applications/aws_s3/app.py +33 -100
- universal_mcp/applications/bill/app.py +546 -1957
- universal_mcp/applications/box/app.py +1068 -3981
- universal_mcp/applications/braze/app.py +364 -1430
- universal_mcp/applications/browser_use/app.py +2 -8
- universal_mcp/applications/cal_com_v2/app.py +207 -625
- universal_mcp/applications/calendly/app.py +61 -200
- universal_mcp/applications/canva/app.py +45 -110
- universal_mcp/applications/clickup/app.py +207 -674
- universal_mcp/applications/coda/app.py +146 -426
- universal_mcp/applications/confluence/app.py +310 -1098
- universal_mcp/applications/contentful/app.py +36 -151
- universal_mcp/applications/crustdata/app.py +28 -107
- universal_mcp/applications/dialpad/app.py +283 -756
- universal_mcp/applications/digitalocean/app.py +1766 -5777
- 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/app.py +6 -17
- universal_mcp/applications/falai/app.py +23 -100
- universal_mcp/applications/figma/app.py +53 -137
- universal_mcp/applications/file_system/app.py +2 -13
- universal_mcp/applications/firecrawl/app.py +51 -152
- universal_mcp/applications/fireflies/app.py +59 -281
- universal_mcp/applications/fpl/app.py +91 -528
- 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 +52 -161
- universal_mcp/applications/github/app.py +19 -56
- universal_mcp/applications/gong/app.py +88 -248
- universal_mcp/applications/google_calendar/app.py +16 -68
- universal_mcp/applications/google_docs/app.py +88 -188
- universal_mcp/applications/google_drive/app.py +140 -462
- universal_mcp/applications/google_gemini/app.py +12 -64
- universal_mcp/applications/google_mail/app.py +28 -157
- universal_mcp/applications/google_searchconsole/app.py +15 -48
- universal_mcp/applications/google_sheet/app.py +101 -578
- universal_mcp/applications/google_sheet/helper.py +10 -37
- universal_mcp/applications/hashnode/app.py +57 -269
- universal_mcp/applications/heygen/app.py +44 -122
- universal_mcp/applications/http_tools/app.py +10 -32
- universal_mcp/applications/hubspot/api_segments/crm_api.py +460 -1573
- universal_mcp/applications/hubspot/api_segments/marketing_api.py +74 -262
- universal_mcp/applications/hubspot/app.py +23 -87
- universal_mcp/applications/jira/app.py +2071 -7986
- universal_mcp/applications/klaviyo/app.py +494 -1376
- universal_mcp/applications/linkedin/README.md +9 -2
- universal_mcp/applications/linkedin/app.py +392 -212
- universal_mcp/applications/mailchimp/app.py +450 -1605
- universal_mcp/applications/markitdown/app.py +8 -20
- universal_mcp/applications/miro/app.py +217 -699
- universal_mcp/applications/ms_teams/app.py +64 -186
- universal_mcp/applications/neon/app.py +86 -192
- universal_mcp/applications/notion/app.py +21 -36
- universal_mcp/applications/onedrive/app.py +14 -36
- universal_mcp/applications/openai/app.py +42 -165
- universal_mcp/applications/outlook/app.py +16 -76
- universal_mcp/applications/perplexity/app.py +4 -19
- universal_mcp/applications/pipedrive/app.py +832 -3142
- universal_mcp/applications/posthog/app.py +163 -432
- universal_mcp/applications/reddit/app.py +40 -139
- universal_mcp/applications/resend/app.py +41 -107
- universal_mcp/applications/retell/app.py +14 -41
- universal_mcp/applications/rocketlane/app.py +221 -934
- universal_mcp/applications/scraper/README.md +7 -4
- universal_mcp/applications/scraper/app.py +216 -102
- universal_mcp/applications/semanticscholar/app.py +22 -64
- universal_mcp/applications/semrush/app.py +43 -77
- universal_mcp/applications/sendgrid/app.py +512 -1262
- universal_mcp/applications/sentry/app.py +271 -906
- universal_mcp/applications/serpapi/app.py +40 -143
- universal_mcp/applications/sharepoint/app.py +15 -37
- universal_mcp/applications/shopify/app.py +1551 -4287
- universal_mcp/applications/shortcut/app.py +155 -417
- universal_mcp/applications/slack/app.py +50 -101
- universal_mcp/applications/spotify/app.py +126 -325
- universal_mcp/applications/supabase/app.py +104 -213
- universal_mcp/applications/tavily/app.py +1 -1
- universal_mcp/applications/trello/app.py +693 -2656
- 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 +70 -283
- universal_mcp/applications/wrike/app.py +45 -118
- universal_mcp/applications/yahoo_finance/app.py +19 -65
- universal_mcp/applications/youtube/app.py +75 -261
- universal_mcp/applications/zenquotes/app.py +2 -2
- {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/METADATA +2 -2
- {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/RECORD +105 -105
- {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.dist-info}/WHEEL +0 -0
- {universal_mcp_applications-0.1.30.dist-info → universal_mcp_applications-0.1.36rc1.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
|
|
|
@@ -9,7 +8,7 @@ class PosthogApp(APIApplication):
|
|
|
9
8
|
super().__init__(name="posthog", integration=integration, **kwargs)
|
|
10
9
|
self.base_url = "https://us.posthog.com"
|
|
11
10
|
|
|
12
|
-
def is_generating_demo_data_retrieve(self, organization_id, id) -> dict[str, Any]:
|
|
11
|
+
async def is_generating_demo_data_retrieve(self, organization_id, id) -> dict[str, Any]:
|
|
13
12
|
"""
|
|
14
13
|
Checks if demo data is being generated for a specific project within an organization.
|
|
15
14
|
|
|
@@ -33,7 +32,7 @@ class PosthogApp(APIApplication):
|
|
|
33
32
|
response.raise_for_status()
|
|
34
33
|
return response.json()
|
|
35
34
|
|
|
36
|
-
def reset_token_partial_update(
|
|
35
|
+
async def reset_token_partial_update(
|
|
37
36
|
self,
|
|
38
37
|
organization_id,
|
|
39
38
|
id,
|
|
@@ -824,9 +823,7 @@ class PosthogApp(APIApplication):
|
|
|
824
823
|
response.raise_for_status()
|
|
825
824
|
return response.json()
|
|
826
825
|
|
|
827
|
-
def proxy_records_list(
|
|
828
|
-
self, organization_id, limit=None, offset=None
|
|
829
|
-
) -> dict[str, Any]:
|
|
826
|
+
async def proxy_records_list(self, organization_id, limit=None, offset=None) -> dict[str, Any]:
|
|
830
827
|
"""
|
|
831
828
|
Retrieves a paginated list of proxy records for a specified organization using query parameters for limit and offset.
|
|
832
829
|
|
|
@@ -844,24 +841,13 @@ class PosthogApp(APIApplication):
|
|
|
844
841
|
if organization_id is None:
|
|
845
842
|
raise ValueError("Missing required parameter 'organization_id'")
|
|
846
843
|
url = f"{self.base_url}/api/organizations/{organization_id}/proxy_records/"
|
|
847
|
-
query_params = {
|
|
848
|
-
k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None
|
|
849
|
-
}
|
|
844
|
+
query_params = {k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None}
|
|
850
845
|
response = self._get(url, params=query_params)
|
|
851
846
|
response.raise_for_status()
|
|
852
847
|
return response.json()
|
|
853
848
|
|
|
854
|
-
def proxy_records_create(
|
|
855
|
-
self,
|
|
856
|
-
organization_id,
|
|
857
|
-
id,
|
|
858
|
-
domain,
|
|
859
|
-
target_cname,
|
|
860
|
-
status,
|
|
861
|
-
message,
|
|
862
|
-
created_at,
|
|
863
|
-
updated_at,
|
|
864
|
-
created_by,
|
|
849
|
+
async def proxy_records_create(
|
|
850
|
+
self, organization_id, id, domain, target_cname, status, message, created_at, updated_at, created_by
|
|
865
851
|
) -> dict[str, Any]:
|
|
866
852
|
"""
|
|
867
853
|
Creates a proxy record for the specified organization using the provided organization ID.
|
|
@@ -902,7 +888,7 @@ class PosthogApp(APIApplication):
|
|
|
902
888
|
response.raise_for_status()
|
|
903
889
|
return response.json()
|
|
904
890
|
|
|
905
|
-
def proxy_records_retrieve(self, organization_id, id) -> dict[str, Any]:
|
|
891
|
+
async def proxy_records_retrieve(self, organization_id, id) -> dict[str, Any]:
|
|
906
892
|
"""
|
|
907
893
|
Retrieves a specific proxy record by its ID for a given organization using the PostHog API.
|
|
908
894
|
|
|
@@ -926,18 +912,8 @@ class PosthogApp(APIApplication):
|
|
|
926
912
|
response.raise_for_status()
|
|
927
913
|
return response.json()
|
|
928
914
|
|
|
929
|
-
def proxy_records_update(
|
|
930
|
-
self,
|
|
931
|
-
organization_id,
|
|
932
|
-
id,
|
|
933
|
-
id_body,
|
|
934
|
-
domain,
|
|
935
|
-
target_cname,
|
|
936
|
-
status,
|
|
937
|
-
message,
|
|
938
|
-
created_at,
|
|
939
|
-
updated_at,
|
|
940
|
-
created_by,
|
|
915
|
+
async def proxy_records_update(
|
|
916
|
+
self, organization_id, id, id_body, domain, target_cname, status, message, created_at, updated_at, created_by
|
|
941
917
|
) -> dict[str, Any]:
|
|
942
918
|
"""
|
|
943
919
|
Updates a specific proxy record within an organization using the provided identifier and returns a status upon success.
|
|
@@ -981,7 +957,7 @@ class PosthogApp(APIApplication):
|
|
|
981
957
|
response.raise_for_status()
|
|
982
958
|
return response.json()
|
|
983
959
|
|
|
984
|
-
def proxy_records_partial_update(
|
|
960
|
+
async def proxy_records_partial_update(
|
|
985
961
|
self,
|
|
986
962
|
organization_id,
|
|
987
963
|
id,
|
|
@@ -1036,7 +1012,7 @@ class PosthogApp(APIApplication):
|
|
|
1036
1012
|
response.raise_for_status()
|
|
1037
1013
|
return response.json()
|
|
1038
1014
|
|
|
1039
|
-
def proxy_records_destroy(self, organization_id, id) -> Any:
|
|
1015
|
+
async def proxy_records_destroy(self, organization_id, id) -> Any:
|
|
1040
1016
|
"""
|
|
1041
1017
|
Deletes a specific proxy record identified by `{id}` within an organization specified by `{organization_id}` using the `DELETE` method.
|
|
1042
1018
|
|
|
@@ -1060,7 +1036,7 @@ class PosthogApp(APIApplication):
|
|
|
1060
1036
|
response.raise_for_status()
|
|
1061
1037
|
return response.json()
|
|
1062
1038
|
|
|
1063
|
-
def roles_list(self, organization_id, limit=None, offset=None) -> dict[str, Any]:
|
|
1039
|
+
async def roles_list(self, organization_id, limit=None, offset=None) -> dict[str, Any]:
|
|
1064
1040
|
"""
|
|
1065
1041
|
Retrieves a list of roles for a specified organization using the provided organization ID, with optional parameters to limit and offset the results.
|
|
1066
1042
|
|
|
@@ -1078,22 +1054,13 @@ class PosthogApp(APIApplication):
|
|
|
1078
1054
|
if organization_id is None:
|
|
1079
1055
|
raise ValueError("Missing required parameter 'organization_id'")
|
|
1080
1056
|
url = f"{self.base_url}/api/organizations/{organization_id}/roles/"
|
|
1081
|
-
query_params = {
|
|
1082
|
-
k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None
|
|
1083
|
-
}
|
|
1057
|
+
query_params = {k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None}
|
|
1084
1058
|
response = self._get(url, params=query_params)
|
|
1085
1059
|
response.raise_for_status()
|
|
1086
1060
|
return response.json()
|
|
1087
1061
|
|
|
1088
|
-
def roles_create(
|
|
1089
|
-
self,
|
|
1090
|
-
organization_id,
|
|
1091
|
-
id,
|
|
1092
|
-
name,
|
|
1093
|
-
created_at,
|
|
1094
|
-
created_by,
|
|
1095
|
-
members,
|
|
1096
|
-
feature_flags_access_level=None,
|
|
1062
|
+
async def roles_create(
|
|
1063
|
+
self, organization_id, id, name, created_at, created_by, members, feature_flags_access_level=None
|
|
1097
1064
|
) -> dict[str, Any]:
|
|
1098
1065
|
"""
|
|
1099
1066
|
Creates a new role within the specified organization and returns the created resource upon success.
|
|
@@ -1130,7 +1097,7 @@ class PosthogApp(APIApplication):
|
|
|
1130
1097
|
response.raise_for_status()
|
|
1131
1098
|
return response.json()
|
|
1132
1099
|
|
|
1133
|
-
def roles_retrieve(self, organization_id, id) -> dict[str, Any]:
|
|
1100
|
+
async def roles_retrieve(self, organization_id, id) -> dict[str, Any]:
|
|
1134
1101
|
"""
|
|
1135
1102
|
Retrieves a specific role within an organization based on the role and organization identifiers.
|
|
1136
1103
|
|
|
@@ -1154,16 +1121,8 @@ class PosthogApp(APIApplication):
|
|
|
1154
1121
|
response.raise_for_status()
|
|
1155
1122
|
return response.json()
|
|
1156
1123
|
|
|
1157
|
-
def roles_update(
|
|
1158
|
-
self,
|
|
1159
|
-
organization_id,
|
|
1160
|
-
id,
|
|
1161
|
-
id_body,
|
|
1162
|
-
name,
|
|
1163
|
-
created_at,
|
|
1164
|
-
created_by,
|
|
1165
|
-
members,
|
|
1166
|
-
feature_flags_access_level=None,
|
|
1124
|
+
async def roles_update(
|
|
1125
|
+
self, organization_id, id, id_body, name, created_at, created_by, members, feature_flags_access_level=None
|
|
1167
1126
|
) -> dict[str, Any]:
|
|
1168
1127
|
"""
|
|
1169
1128
|
Updates a specific role in an organization using the provided role ID and organization ID.
|
|
@@ -1203,16 +1162,8 @@ class PosthogApp(APIApplication):
|
|
|
1203
1162
|
response.raise_for_status()
|
|
1204
1163
|
return response.json()
|
|
1205
1164
|
|
|
1206
|
-
def roles_partial_update(
|
|
1207
|
-
self,
|
|
1208
|
-
organization_id,
|
|
1209
|
-
id,
|
|
1210
|
-
id_body=None,
|
|
1211
|
-
name=None,
|
|
1212
|
-
feature_flags_access_level=None,
|
|
1213
|
-
created_at=None,
|
|
1214
|
-
created_by=None,
|
|
1215
|
-
members=None,
|
|
1165
|
+
async def roles_partial_update(
|
|
1166
|
+
self, organization_id, id, id_body=None, name=None, feature_flags_access_level=None, created_at=None, created_by=None, members=None
|
|
1216
1167
|
) -> dict[str, Any]:
|
|
1217
1168
|
"""
|
|
1218
1169
|
Updates the specified role within an organization using partial modifications via the PATCH method and returns a success response.
|
|
@@ -1252,7 +1203,7 @@ class PosthogApp(APIApplication):
|
|
|
1252
1203
|
response.raise_for_status()
|
|
1253
1204
|
return response.json()
|
|
1254
1205
|
|
|
1255
|
-
def roles_destroy(self, organization_id, id) -> Any:
|
|
1206
|
+
async def roles_destroy(self, organization_id, id) -> Any:
|
|
1256
1207
|
"""
|
|
1257
1208
|
Removes a specific role from an organization by its ID using a DELETE request and returns a 204 No Content response upon success.
|
|
1258
1209
|
|
|
@@ -1276,9 +1227,7 @@ class PosthogApp(APIApplication):
|
|
|
1276
1227
|
response.raise_for_status()
|
|
1277
1228
|
return response.json()
|
|
1278
1229
|
|
|
1279
|
-
def roles_role_memberships_list(
|
|
1280
|
-
self, organization_id, role_id, limit=None, offset=None
|
|
1281
|
-
) -> dict[str, Any]:
|
|
1230
|
+
async def roles_role_memberships_list(self, organization_id, role_id, limit=None, offset=None) -> dict[str, Any]:
|
|
1282
1231
|
"""
|
|
1283
1232
|
Retrieves a paginated list of role memberships for a specific role within an organization using query parameters for limit and offset.
|
|
1284
1233
|
|
|
@@ -1299,24 +1248,13 @@ class PosthogApp(APIApplication):
|
|
|
1299
1248
|
if role_id is None:
|
|
1300
1249
|
raise ValueError("Missing required parameter 'role_id'")
|
|
1301
1250
|
url = f"{self.base_url}/api/organizations/{organization_id}/roles/{role_id}/role_memberships/"
|
|
1302
|
-
query_params = {
|
|
1303
|
-
k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None
|
|
1304
|
-
}
|
|
1251
|
+
query_params = {k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None}
|
|
1305
1252
|
response = self._get(url, params=query_params)
|
|
1306
1253
|
response.raise_for_status()
|
|
1307
1254
|
return response.json()
|
|
1308
1255
|
|
|
1309
|
-
def roles_role_memberships_create(
|
|
1310
|
-
self,
|
|
1311
|
-
organization_id,
|
|
1312
|
-
role_id,
|
|
1313
|
-
id,
|
|
1314
|
-
role_id_body,
|
|
1315
|
-
organization_member,
|
|
1316
|
-
user,
|
|
1317
|
-
joined_at,
|
|
1318
|
-
updated_at,
|
|
1319
|
-
user_uuid,
|
|
1256
|
+
async def roles_role_memberships_create(
|
|
1257
|
+
self, organization_id, role_id, id, role_id_body, organization_member, user, joined_at, updated_at, user_uuid
|
|
1320
1258
|
) -> dict[str, Any]:
|
|
1321
1259
|
"""
|
|
1322
1260
|
Assigns a role to an organization member by associating the role ID with the membership via a POST request.
|
|
@@ -1358,7 +1296,7 @@ class PosthogApp(APIApplication):
|
|
|
1358
1296
|
response.raise_for_status()
|
|
1359
1297
|
return response.json()
|
|
1360
1298
|
|
|
1361
|
-
def roles_role_memberships_destroy(self, organization_id, role_id, id) -> Any:
|
|
1299
|
+
async def roles_role_memberships_destroy(self, organization_id, role_id, id) -> Any:
|
|
1362
1300
|
"""
|
|
1363
1301
|
Removes a specific role membership from an organization role using the provided organization ID, role ID, and membership ID.
|
|
1364
1302
|
|
|
@@ -1385,9 +1323,7 @@ class PosthogApp(APIApplication):
|
|
|
1385
1323
|
response.raise_for_status()
|
|
1386
1324
|
return response.json()
|
|
1387
1325
|
|
|
1388
|
-
def actions_list(
|
|
1389
|
-
self, project_id, format=None, limit=None, offset=None
|
|
1390
|
-
) -> dict[str, Any]:
|
|
1326
|
+
async def actions_list(self, project_id, format=None, limit=None, offset=None) -> dict[str, Any]:
|
|
1391
1327
|
"""
|
|
1392
1328
|
Retrieves a list of actions for a specified project using the "GET" method, allowing optional filtering by format, limit, and offset.
|
|
1393
1329
|
|
|
@@ -1406,16 +1342,12 @@ class PosthogApp(APIApplication):
|
|
|
1406
1342
|
if project_id is None:
|
|
1407
1343
|
raise ValueError("Missing required parameter 'project_id'")
|
|
1408
1344
|
url = f"{self.base_url}/api/projects/{project_id}/actions/"
|
|
1409
|
-
query_params = {
|
|
1410
|
-
k: v
|
|
1411
|
-
for k, v in [("format", format), ("limit", limit), ("offset", offset)]
|
|
1412
|
-
if v is not None
|
|
1413
|
-
}
|
|
1345
|
+
query_params = {k: v for k, v in [("format", format), ("limit", limit), ("offset", offset)] if v is not None}
|
|
1414
1346
|
response = self._get(url, params=query_params)
|
|
1415
1347
|
response.raise_for_status()
|
|
1416
1348
|
return response.json()
|
|
1417
1349
|
|
|
1418
|
-
def actions_create(
|
|
1350
|
+
async def actions_create(
|
|
1419
1351
|
self,
|
|
1420
1352
|
project_id,
|
|
1421
1353
|
format=None,
|
|
@@ -1498,16 +1430,8 @@ class PosthogApp(APIApplication):
|
|
|
1498
1430
|
response.raise_for_status()
|
|
1499
1431
|
return response.json()
|
|
1500
1432
|
|
|
1501
|
-
def notebooks_list(
|
|
1502
|
-
self,
|
|
1503
|
-
project_id,
|
|
1504
|
-
contains=None,
|
|
1505
|
-
created_by=None,
|
|
1506
|
-
date_from=None,
|
|
1507
|
-
date_to=None,
|
|
1508
|
-
limit=None,
|
|
1509
|
-
offset=None,
|
|
1510
|
-
user=None,
|
|
1433
|
+
async def notebooks_list(
|
|
1434
|
+
self, project_id, contains=None, created_by=None, date_from=None, date_to=None, limit=None, offset=None, user=None
|
|
1511
1435
|
) -> dict[str, Any]:
|
|
1512
1436
|
"""
|
|
1513
1437
|
Retrieves a list of notebooks for a specific project with optional filtering by content, creator, date range, and pagination parameters.
|
|
@@ -1548,7 +1472,7 @@ class PosthogApp(APIApplication):
|
|
|
1548
1472
|
response.raise_for_status()
|
|
1549
1473
|
return response.json()
|
|
1550
1474
|
|
|
1551
|
-
def notebooks_create(
|
|
1475
|
+
async def notebooks_create(
|
|
1552
1476
|
self,
|
|
1553
1477
|
project_id,
|
|
1554
1478
|
id=None,
|
|
@@ -1614,7 +1538,7 @@ class PosthogApp(APIApplication):
|
|
|
1614
1538
|
response.raise_for_status()
|
|
1615
1539
|
return response.json()
|
|
1616
1540
|
|
|
1617
|
-
def notebooks_retrieve(self, project_id, short_id) -> dict[str, Any]:
|
|
1541
|
+
async def notebooks_retrieve(self, project_id, short_id) -> dict[str, Any]:
|
|
1618
1542
|
"""
|
|
1619
1543
|
Retrieves the details of a specific notebook identified by its short ID within a given project.
|
|
1620
1544
|
|
|
@@ -1638,7 +1562,7 @@ class PosthogApp(APIApplication):
|
|
|
1638
1562
|
response.raise_for_status()
|
|
1639
1563
|
return response.json()
|
|
1640
1564
|
|
|
1641
|
-
def notebooks_update(
|
|
1565
|
+
async def notebooks_update(
|
|
1642
1566
|
self,
|
|
1643
1567
|
project_id,
|
|
1644
1568
|
short_id,
|
|
@@ -1708,7 +1632,7 @@ class PosthogApp(APIApplication):
|
|
|
1708
1632
|
response.raise_for_status()
|
|
1709
1633
|
return response.json()
|
|
1710
1634
|
|
|
1711
|
-
def notebooks_partial_update(
|
|
1635
|
+
async def notebooks_partial_update(
|
|
1712
1636
|
self,
|
|
1713
1637
|
project_id,
|
|
1714
1638
|
short_id,
|
|
@@ -1778,7 +1702,7 @@ class PosthogApp(APIApplication):
|
|
|
1778
1702
|
response.raise_for_status()
|
|
1779
1703
|
return response.json()
|
|
1780
1704
|
|
|
1781
|
-
def notebooks_destroy(self, project_id, short_id) -> Any:
|
|
1705
|
+
async def notebooks_destroy(self, project_id, short_id) -> Any:
|
|
1782
1706
|
"""
|
|
1783
1707
|
Deletes a notebook specified by its short ID from a project identified by its project ID using the API.
|
|
1784
1708
|
|
|
@@ -1802,7 +1726,7 @@ class PosthogApp(APIApplication):
|
|
|
1802
1726
|
response.raise_for_status()
|
|
1803
1727
|
return response.json()
|
|
1804
1728
|
|
|
1805
|
-
def notebooks_activity_retrieve_2(self, project_id, short_id) -> Any:
|
|
1729
|
+
async def notebooks_activity_retrieve_2(self, project_id, short_id) -> Any:
|
|
1806
1730
|
"""
|
|
1807
1731
|
Retrieves the activity history for a specific notebook within a project.
|
|
1808
1732
|
|
|
@@ -1820,15 +1744,13 @@ class PosthogApp(APIApplication):
|
|
|
1820
1744
|
raise ValueError("Missing required parameter 'project_id'")
|
|
1821
1745
|
if short_id is None:
|
|
1822
1746
|
raise ValueError("Missing required parameter 'short_id'")
|
|
1823
|
-
url =
|
|
1824
|
-
f"{self.base_url}/api/projects/{project_id}/notebooks/{short_id}/activity/"
|
|
1825
|
-
)
|
|
1747
|
+
url = f"{self.base_url}/api/projects/{project_id}/notebooks/{short_id}/activity/"
|
|
1826
1748
|
query_params = {}
|
|
1827
1749
|
response = self._get(url, params=query_params)
|
|
1828
1750
|
response.raise_for_status()
|
|
1829
1751
|
return response.json()
|
|
1830
1752
|
|
|
1831
|
-
def notebooks_activity_retrieve(self, project_id) -> Any:
|
|
1753
|
+
async def notebooks_activity_retrieve(self, project_id) -> Any:
|
|
1832
1754
|
"""
|
|
1833
1755
|
Retrieves activity information for a notebook within a specified project.
|
|
1834
1756
|
|
|
@@ -1849,7 +1771,7 @@ class PosthogApp(APIApplication):
|
|
|
1849
1771
|
response.raise_for_status()
|
|
1850
1772
|
return response.json()
|
|
1851
1773
|
|
|
1852
|
-
def notebooks_recording_comments_retrieve(self, project_id) -> Any:
|
|
1774
|
+
async def notebooks_recording_comments_retrieve(self, project_id) -> Any:
|
|
1853
1775
|
"""
|
|
1854
1776
|
Retrieves a list of recording comments associated with a specific project by its ID.
|
|
1855
1777
|
|
|
@@ -1870,16 +1792,8 @@ class PosthogApp(APIApplication):
|
|
|
1870
1792
|
response.raise_for_status()
|
|
1871
1793
|
return response.json()
|
|
1872
1794
|
|
|
1873
|
-
def persons_list(
|
|
1874
|
-
self,
|
|
1875
|
-
project_id,
|
|
1876
|
-
distinct_id=None,
|
|
1877
|
-
email=None,
|
|
1878
|
-
format=None,
|
|
1879
|
-
limit=None,
|
|
1880
|
-
offset=None,
|
|
1881
|
-
properties=None,
|
|
1882
|
-
search=None,
|
|
1795
|
+
async def persons_list(
|
|
1796
|
+
self, project_id, distinct_id=None, email=None, format=None, limit=None, offset=None, properties=None, search=None
|
|
1883
1797
|
) -> dict[str, Any]:
|
|
1884
1798
|
"""
|
|
1885
1799
|
Retrieves a list of persons associated with a specific project, optionally filtered by distinct ID, email, properties, or search criteria.
|
|
@@ -1920,7 +1834,7 @@ class PosthogApp(APIApplication):
|
|
|
1920
1834
|
response.raise_for_status()
|
|
1921
1835
|
return response.json()
|
|
1922
1836
|
|
|
1923
|
-
def persons_retrieve(self, project_id, id, format=None) -> dict[str, Any]:
|
|
1837
|
+
async def persons_retrieve(self, project_id, id, format=None) -> dict[str, Any]:
|
|
1924
1838
|
"""
|
|
1925
1839
|
Retrieves a specific person's details from a project using their ID and allows optional response formatting.
|
|
1926
1840
|
|
|
@@ -1945,17 +1859,8 @@ class PosthogApp(APIApplication):
|
|
|
1945
1859
|
response.raise_for_status()
|
|
1946
1860
|
return response.json()
|
|
1947
1861
|
|
|
1948
|
-
def persons_update(
|
|
1949
|
-
self,
|
|
1950
|
-
project_id,
|
|
1951
|
-
id,
|
|
1952
|
-
format=None,
|
|
1953
|
-
id_body=None,
|
|
1954
|
-
name=None,
|
|
1955
|
-
distinct_ids=None,
|
|
1956
|
-
properties=None,
|
|
1957
|
-
created_at=None,
|
|
1958
|
-
uuid=None,
|
|
1862
|
+
async def persons_update(
|
|
1863
|
+
self, project_id, id, format=None, id_body=None, name=None, distinct_ids=None, properties=None, created_at=None, uuid=None
|
|
1959
1864
|
) -> dict[str, Any]:
|
|
1960
1865
|
"""
|
|
1961
1866
|
Updates a specific person's details within a designated project and returns a success response upon completion.
|
|
@@ -1996,17 +1901,8 @@ class PosthogApp(APIApplication):
|
|
|
1996
1901
|
response.raise_for_status()
|
|
1997
1902
|
return response.json()
|
|
1998
1903
|
|
|
1999
|
-
def persons_partial_update(
|
|
2000
|
-
self,
|
|
2001
|
-
project_id,
|
|
2002
|
-
id,
|
|
2003
|
-
format=None,
|
|
2004
|
-
id_body=None,
|
|
2005
|
-
name=None,
|
|
2006
|
-
distinct_ids=None,
|
|
2007
|
-
properties=None,
|
|
2008
|
-
created_at=None,
|
|
2009
|
-
uuid=None,
|
|
1904
|
+
async def persons_partial_update(
|
|
1905
|
+
self, project_id, id, format=None, id_body=None, name=None, distinct_ids=None, properties=None, created_at=None, uuid=None
|
|
2010
1906
|
) -> dict[str, Any]:
|
|
2011
1907
|
"""
|
|
2012
1908
|
Updates the details of a specific person associated with a project using the PATCH method, allowing for partial modification of the person's information.
|
|
@@ -2047,7 +1943,7 @@ class PosthogApp(APIApplication):
|
|
|
2047
1943
|
response.raise_for_status()
|
|
2048
1944
|
return response.json()
|
|
2049
1945
|
|
|
2050
|
-
def persons_destroy(self, project_id, id, delete_events=None, format=None) -> Any:
|
|
1946
|
+
async def persons_destroy(self, project_id, id, delete_events=None, format=None) -> Any:
|
|
2051
1947
|
"""
|
|
2052
1948
|
Deletes a specific person within a project, optionally removing associated events, without returning content.
|
|
2053
1949
|
|
|
@@ -2068,16 +1964,12 @@ class PosthogApp(APIApplication):
|
|
|
2068
1964
|
if id is None:
|
|
2069
1965
|
raise ValueError("Missing required parameter 'id'")
|
|
2070
1966
|
url = f"{self.base_url}/api/projects/{project_id}/persons/{id}/"
|
|
2071
|
-
query_params = {
|
|
2072
|
-
k: v
|
|
2073
|
-
for k, v in [("delete_events", delete_events), ("format", format)]
|
|
2074
|
-
if v is not None
|
|
2075
|
-
}
|
|
1967
|
+
query_params = {k: v for k, v in [("delete_events", delete_events), ("format", format)] if v is not None}
|
|
2076
1968
|
response = self._delete(url, params=query_params)
|
|
2077
1969
|
response.raise_for_status()
|
|
2078
1970
|
return response.json()
|
|
2079
1971
|
|
|
2080
|
-
def persons_activity_retrieve_2(self, project_id, id, format=None) -> Any:
|
|
1972
|
+
async def persons_activity_retrieve_2(self, project_id, id, format=None) -> Any:
|
|
2081
1973
|
"""
|
|
2082
1974
|
Retrieves activity information for a specific person within a project using the "GET" method.
|
|
2083
1975
|
|
|
@@ -2102,17 +1994,8 @@ class PosthogApp(APIApplication):
|
|
|
2102
1994
|
response.raise_for_status()
|
|
2103
1995
|
return response.json()
|
|
2104
1996
|
|
|
2105
|
-
def persons_delete_events_create(
|
|
2106
|
-
self,
|
|
2107
|
-
project_id,
|
|
2108
|
-
id,
|
|
2109
|
-
format=None,
|
|
2110
|
-
id_body=None,
|
|
2111
|
-
name=None,
|
|
2112
|
-
distinct_ids=None,
|
|
2113
|
-
properties=None,
|
|
2114
|
-
created_at=None,
|
|
2115
|
-
uuid=None,
|
|
1997
|
+
async def persons_delete_events_create(
|
|
1998
|
+
self, project_id, id, format=None, id_body=None, name=None, distinct_ids=None, properties=None, created_at=None, uuid=None
|
|
2116
1999
|
) -> Any:
|
|
2117
2000
|
"""
|
|
2118
2001
|
Deletes events associated with a person in a project using the POST method and returns a status message.
|
|
@@ -2153,18 +2036,8 @@ class PosthogApp(APIApplication):
|
|
|
2153
2036
|
response.raise_for_status()
|
|
2154
2037
|
return response.json()
|
|
2155
2038
|
|
|
2156
|
-
def persons_delete_property_create(
|
|
2157
|
-
self,
|
|
2158
|
-
project_id,
|
|
2159
|
-
id,
|
|
2160
|
-
unset,
|
|
2161
|
-
format=None,
|
|
2162
|
-
id_body=None,
|
|
2163
|
-
name=None,
|
|
2164
|
-
distinct_ids=None,
|
|
2165
|
-
properties=None,
|
|
2166
|
-
created_at=None,
|
|
2167
|
-
uuid=None,
|
|
2039
|
+
async def persons_delete_property_create(
|
|
2040
|
+
self, project_id, id, unset, format=None, id_body=None, name=None, distinct_ids=None, properties=None, created_at=None, uuid=None
|
|
2168
2041
|
) -> Any:
|
|
2169
2042
|
"""
|
|
2170
2043
|
Removes a specified property from a person within a project using a POST request, returning a success status on completion.
|
|
@@ -2201,14 +2074,12 @@ class PosthogApp(APIApplication):
|
|
|
2201
2074
|
}
|
|
2202
2075
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
2203
2076
|
url = f"{self.base_url}/api/projects/{project_id}/persons/{id}/delete_property/"
|
|
2204
|
-
query_params = {
|
|
2205
|
-
k: v for k, v in [("$unset", unset), ("format", format)] if v is not None
|
|
2206
|
-
}
|
|
2077
|
+
query_params = {k: v for k, v in [("$unset", unset), ("format", format)] if v is not None}
|
|
2207
2078
|
response = self._post(url, data=request_body, params=query_params)
|
|
2208
2079
|
response.raise_for_status()
|
|
2209
2080
|
return response.json()
|
|
2210
2081
|
|
|
2211
|
-
def persons_properties_timeline_retrieve(self, project_id, id, format=None) -> Any:
|
|
2082
|
+
async def persons_properties_timeline_retrieve(self, project_id, id, format=None) -> Any:
|
|
2212
2083
|
"""
|
|
2213
2084
|
Retrieves a timeline of property changes for a specific person in a project, optionally formatted.
|
|
2214
2085
|
|
|
@@ -2233,17 +2104,8 @@ class PosthogApp(APIApplication):
|
|
|
2233
2104
|
response.raise_for_status()
|
|
2234
2105
|
return response.json()
|
|
2235
2106
|
|
|
2236
|
-
def persons_split_create(
|
|
2237
|
-
self,
|
|
2238
|
-
project_id,
|
|
2239
|
-
id,
|
|
2240
|
-
format=None,
|
|
2241
|
-
id_body=None,
|
|
2242
|
-
name=None,
|
|
2243
|
-
distinct_ids=None,
|
|
2244
|
-
properties=None,
|
|
2245
|
-
created_at=None,
|
|
2246
|
-
uuid=None,
|
|
2107
|
+
async def persons_split_create(
|
|
2108
|
+
self, project_id, id, format=None, id_body=None, name=None, distinct_ids=None, properties=None, created_at=None, uuid=None
|
|
2247
2109
|
) -> Any:
|
|
2248
2110
|
"""
|
|
2249
2111
|
Splits a specified person into separate entities within a project and returns the operation result.
|
|
@@ -2284,7 +2146,7 @@ class PosthogApp(APIApplication):
|
|
|
2284
2146
|
response.raise_for_status()
|
|
2285
2147
|
return response.json()
|
|
2286
2148
|
|
|
2287
|
-
def persons_update_property_create(
|
|
2149
|
+
async def persons_update_property_create(
|
|
2288
2150
|
self,
|
|
2289
2151
|
project_id,
|
|
2290
2152
|
id,
|
|
@@ -2334,16 +2196,12 @@ class PosthogApp(APIApplication):
|
|
|
2334
2196
|
}
|
|
2335
2197
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
2336
2198
|
url = f"{self.base_url}/api/projects/{project_id}/persons/{id}/update_property/"
|
|
2337
|
-
query_params = {
|
|
2338
|
-
k: v
|
|
2339
|
-
for k, v in [("format", format), ("key", key), ("value", value)]
|
|
2340
|
-
if v is not None
|
|
2341
|
-
}
|
|
2199
|
+
query_params = {k: v for k, v in [("format", format), ("key", key), ("value", value)] if v is not None}
|
|
2342
2200
|
response = self._post(url, data=request_body, params=query_params)
|
|
2343
2201
|
response.raise_for_status()
|
|
2344
2202
|
return response.json()
|
|
2345
2203
|
|
|
2346
|
-
def persons_activity_retrieve(self, project_id, format=None) -> Any:
|
|
2204
|
+
async def persons_activity_retrieve(self, project_id, format=None) -> Any:
|
|
2347
2205
|
"""
|
|
2348
2206
|
Retrieves activity data for persons associated with a specific project in the requested format.
|
|
2349
2207
|
|
|
@@ -2365,7 +2223,7 @@ class PosthogApp(APIApplication):
|
|
|
2365
2223
|
response.raise_for_status()
|
|
2366
2224
|
return response.json()
|
|
2367
2225
|
|
|
2368
|
-
def persons_bulk_delete_create(
|
|
2226
|
+
async def persons_bulk_delete_create(
|
|
2369
2227
|
self,
|
|
2370
2228
|
project_id,
|
|
2371
2229
|
delete_events=None,
|
|
@@ -2415,19 +2273,14 @@ class PosthogApp(APIApplication):
|
|
|
2415
2273
|
url = f"{self.base_url}/api/projects/{project_id}/persons/bulk_delete/"
|
|
2416
2274
|
query_params = {
|
|
2417
2275
|
k: v
|
|
2418
|
-
for k, v in [
|
|
2419
|
-
("delete_events", delete_events),
|
|
2420
|
-
("distinct_ids", distinct_ids),
|
|
2421
|
-
("format", format),
|
|
2422
|
-
("ids", ids),
|
|
2423
|
-
]
|
|
2276
|
+
for k, v in [("delete_events", delete_events), ("distinct_ids", distinct_ids), ("format", format), ("ids", ids)]
|
|
2424
2277
|
if v is not None
|
|
2425
2278
|
}
|
|
2426
2279
|
response = self._post(url, data=request_body, params=query_params)
|
|
2427
2280
|
response.raise_for_status()
|
|
2428
2281
|
return response.json()
|
|
2429
2282
|
|
|
2430
|
-
def persons_cohorts_retrieve(self, project_id, format=None) -> Any:
|
|
2283
|
+
async def persons_cohorts_retrieve(self, project_id, format=None) -> Any:
|
|
2431
2284
|
"""
|
|
2432
2285
|
Retrieves a list of person cohorts for a specified project using the provided project ID.
|
|
2433
2286
|
|
|
@@ -2449,7 +2302,7 @@ class PosthogApp(APIApplication):
|
|
|
2449
2302
|
response.raise_for_status()
|
|
2450
2303
|
return response.json()
|
|
2451
2304
|
|
|
2452
|
-
def persons_funnel_retrieve(self, project_id, format=None) -> Any:
|
|
2305
|
+
async def persons_funnel_retrieve(self, project_id, format=None) -> Any:
|
|
2453
2306
|
"""
|
|
2454
2307
|
Retrieves a list of persons in a funnel for a specific project using the project ID and optionally formats the output.
|
|
2455
2308
|
|
|
@@ -2471,16 +2324,8 @@ class PosthogApp(APIApplication):
|
|
|
2471
2324
|
response.raise_for_status()
|
|
2472
2325
|
return response.json()
|
|
2473
2326
|
|
|
2474
|
-
def persons_funnel_create(
|
|
2475
|
-
self,
|
|
2476
|
-
project_id,
|
|
2477
|
-
format=None,
|
|
2478
|
-
id=None,
|
|
2479
|
-
name=None,
|
|
2480
|
-
distinct_ids=None,
|
|
2481
|
-
properties=None,
|
|
2482
|
-
created_at=None,
|
|
2483
|
-
uuid=None,
|
|
2327
|
+
async def persons_funnel_create(
|
|
2328
|
+
self, project_id, format=None, id=None, name=None, distinct_ids=None, properties=None, created_at=None, uuid=None
|
|
2484
2329
|
) -> Any:
|
|
2485
2330
|
"""
|
|
2486
2331
|
Tracks user funnel data for a specific project and returns formatted results.
|
|
@@ -2518,7 +2363,7 @@ class PosthogApp(APIApplication):
|
|
|
2518
2363
|
response.raise_for_status()
|
|
2519
2364
|
return response.json()
|
|
2520
2365
|
|
|
2521
|
-
def persons_funnel_correlation_retrieve(self, project_id, format=None) -> Any:
|
|
2366
|
+
async def persons_funnel_correlation_retrieve(self, project_id, format=None) -> Any:
|
|
2522
2367
|
"""
|
|
2523
2368
|
Retrieves correlation data for persons in a project, identified by the project ID, and optionally formats the output based on the specified format parameter.
|
|
2524
2369
|
|
|
@@ -2540,16 +2385,8 @@ class PosthogApp(APIApplication):
|
|
|
2540
2385
|
response.raise_for_status()
|
|
2541
2386
|
return response.json()
|
|
2542
2387
|
|
|
2543
|
-
def persons_funnel_correlation_create(
|
|
2544
|
-
self,
|
|
2545
|
-
project_id,
|
|
2546
|
-
format=None,
|
|
2547
|
-
id=None,
|
|
2548
|
-
name=None,
|
|
2549
|
-
distinct_ids=None,
|
|
2550
|
-
properties=None,
|
|
2551
|
-
created_at=None,
|
|
2552
|
-
uuid=None,
|
|
2388
|
+
async def persons_funnel_correlation_create(
|
|
2389
|
+
self, project_id, format=None, id=None, name=None, distinct_ids=None, properties=None, created_at=None, uuid=None
|
|
2553
2390
|
) -> Any:
|
|
2554
2391
|
"""
|
|
2555
2392
|
Calculates and returns the correlation between funnel data for individuals within a specified project using the POST method.
|
|
@@ -2587,7 +2424,7 @@ class PosthogApp(APIApplication):
|
|
|
2587
2424
|
response.raise_for_status()
|
|
2588
2425
|
return response.json()
|
|
2589
2426
|
|
|
2590
|
-
def persons_lifecycle_retrieve(self, project_id, format=None) -> Any:
|
|
2427
|
+
async def persons_lifecycle_retrieve(self, project_id, format=None) -> Any:
|
|
2591
2428
|
"""
|
|
2592
2429
|
Retrieves lifecycle information for persons associated with a project, identified by the specified project ID, allowing optional format specification.
|
|
2593
2430
|
|
|
@@ -2609,16 +2446,8 @@ class PosthogApp(APIApplication):
|
|
|
2609
2446
|
response.raise_for_status()
|
|
2610
2447
|
return response.json()
|
|
2611
2448
|
|
|
2612
|
-
def persons_reset_person_distinct_id_create(
|
|
2613
|
-
self,
|
|
2614
|
-
project_id,
|
|
2615
|
-
format=None,
|
|
2616
|
-
id=None,
|
|
2617
|
-
name=None,
|
|
2618
|
-
distinct_ids=None,
|
|
2619
|
-
properties=None,
|
|
2620
|
-
created_at=None,
|
|
2621
|
-
uuid=None,
|
|
2449
|
+
async def persons_reset_person_distinct_id_create(
|
|
2450
|
+
self, project_id, format=None, id=None, name=None, distinct_ids=None, properties=None, created_at=None, uuid=None
|
|
2622
2451
|
) -> Any:
|
|
2623
2452
|
"""
|
|
2624
2453
|
Resets and unlinks a person's distinct identifier in the specified project, clearing associated user data across devices or sessions.
|
|
@@ -2656,7 +2485,7 @@ class PosthogApp(APIApplication):
|
|
|
2656
2485
|
response.raise_for_status()
|
|
2657
2486
|
return response.json()
|
|
2658
2487
|
|
|
2659
|
-
def persons_stickiness_retrieve(self, project_id, format=None) -> Any:
|
|
2488
|
+
async def persons_stickiness_retrieve(self, project_id, format=None) -> Any:
|
|
2660
2489
|
"""
|
|
2661
2490
|
Retrieves stickiness data for persons associated with a specific project, optionally formatted.
|
|
2662
2491
|
|
|
@@ -2678,7 +2507,7 @@ class PosthogApp(APIApplication):
|
|
|
2678
2507
|
response.raise_for_status()
|
|
2679
2508
|
return response.json()
|
|
2680
2509
|
|
|
2681
|
-
def persons_trends_retrieve(self, project_id, format=None) -> Any:
|
|
2510
|
+
async def persons_trends_retrieve(self, project_id, format=None) -> Any:
|
|
2682
2511
|
"""
|
|
2683
2512
|
Retrieves trends related to persons in a specified project using the GET method and returns the data in a requested format.
|
|
2684
2513
|
|
|
@@ -2700,7 +2529,7 @@ class PosthogApp(APIApplication):
|
|
|
2700
2529
|
response.raise_for_status()
|
|
2701
2530
|
return response.json()
|
|
2702
2531
|
|
|
2703
|
-
def persons_values_retrieve(self, project_id, format=None) -> Any:
|
|
2532
|
+
async def persons_values_retrieve(self, project_id, format=None) -> Any:
|
|
2704
2533
|
"""
|
|
2705
2534
|
Retrieves a list of person values for a specified project using the provided project ID.
|
|
2706
2535
|
|
|
@@ -2722,9 +2551,7 @@ class PosthogApp(APIApplication):
|
|
|
2722
2551
|
response.raise_for_status()
|
|
2723
2552
|
return response.json()
|
|
2724
2553
|
|
|
2725
|
-
def plugin_configs_logs_list(
|
|
2726
|
-
self, project_id, plugin_config_id, limit=None, offset=None
|
|
2727
|
-
) -> dict[str, Any]:
|
|
2554
|
+
async def plugin_configs_logs_list(self, project_id, plugin_config_id, limit=None, offset=None) -> dict[str, Any]:
|
|
2728
2555
|
"""
|
|
2729
2556
|
Retrieves and returns log entries for a specific plugin configuration within a project, allowing pagination through query parameters for limit and offset.
|
|
2730
2557
|
|
|
@@ -2745,14 +2572,12 @@ class PosthogApp(APIApplication):
|
|
|
2745
2572
|
if plugin_config_id is None:
|
|
2746
2573
|
raise ValueError("Missing required parameter 'plugin_config_id'")
|
|
2747
2574
|
url = f"{self.base_url}/api/projects/{project_id}/plugin_configs/{plugin_config_id}/logs/"
|
|
2748
|
-
query_params = {
|
|
2749
|
-
k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None
|
|
2750
|
-
}
|
|
2575
|
+
query_params = {k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None}
|
|
2751
2576
|
response = self._get(url, params=query_params)
|
|
2752
2577
|
response.raise_for_status()
|
|
2753
2578
|
return response.json()
|
|
2754
2579
|
|
|
2755
|
-
def property_definitions_list(
|
|
2580
|
+
async def property_definitions_list(
|
|
2756
2581
|
self,
|
|
2757
2582
|
project_id,
|
|
2758
2583
|
event_names=None,
|
|
@@ -2823,7 +2648,7 @@ class PosthogApp(APIApplication):
|
|
|
2823
2648
|
response.raise_for_status()
|
|
2824
2649
|
return response.json()
|
|
2825
2650
|
|
|
2826
|
-
def property_definitions_retrieve(self, project_id, id) -> dict[str, Any]:
|
|
2651
|
+
async def property_definitions_retrieve(self, project_id, id) -> dict[str, Any]:
|
|
2827
2652
|
"""
|
|
2828
2653
|
Retrieves a specific property definition by ID for a given project.
|
|
2829
2654
|
|
|
@@ -2847,16 +2672,8 @@ class PosthogApp(APIApplication):
|
|
|
2847
2672
|
response.raise_for_status()
|
|
2848
2673
|
return response.json()
|
|
2849
2674
|
|
|
2850
|
-
def property_definitions_update(
|
|
2851
|
-
self,
|
|
2852
|
-
project_id,
|
|
2853
|
-
id,
|
|
2854
|
-
id_body,
|
|
2855
|
-
name,
|
|
2856
|
-
is_seen_on_filtered_events,
|
|
2857
|
-
is_numerical=None,
|
|
2858
|
-
property_type=None,
|
|
2859
|
-
tags=None,
|
|
2675
|
+
async def property_definitions_update(
|
|
2676
|
+
self, project_id, id, id_body, name, is_seen_on_filtered_events, is_numerical=None, property_type=None, tags=None
|
|
2860
2677
|
) -> dict[str, Any]:
|
|
2861
2678
|
"""
|
|
2862
2679
|
Updates or replaces a specific property definition within a project using the PUT method, where the project and property definition are identified by their respective IDs.
|
|
@@ -2896,16 +2713,8 @@ class PosthogApp(APIApplication):
|
|
|
2896
2713
|
response.raise_for_status()
|
|
2897
2714
|
return response.json()
|
|
2898
2715
|
|
|
2899
|
-
def property_definitions_partial_update(
|
|
2900
|
-
self,
|
|
2901
|
-
project_id,
|
|
2902
|
-
id,
|
|
2903
|
-
id_body=None,
|
|
2904
|
-
name=None,
|
|
2905
|
-
is_numerical=None,
|
|
2906
|
-
property_type=None,
|
|
2907
|
-
tags=None,
|
|
2908
|
-
is_seen_on_filtered_events=None,
|
|
2716
|
+
async def property_definitions_partial_update(
|
|
2717
|
+
self, project_id, id, id_body=None, name=None, is_numerical=None, property_type=None, tags=None, is_seen_on_filtered_events=None
|
|
2909
2718
|
) -> dict[str, Any]:
|
|
2910
2719
|
"""
|
|
2911
2720
|
Updates a specific property definition for a project using the "PATCH" method, allowing partial modifications to the resource at "/api/projects/{project_id}/property_definitions/{id}/".
|
|
@@ -2945,7 +2754,7 @@ class PosthogApp(APIApplication):
|
|
|
2945
2754
|
response.raise_for_status()
|
|
2946
2755
|
return response.json()
|
|
2947
2756
|
|
|
2948
|
-
def property_definitions_destroy(self, project_id, id) -> Any:
|
|
2757
|
+
async def property_definitions_destroy(self, project_id, id) -> Any:
|
|
2949
2758
|
"""
|
|
2950
2759
|
Deletes a specified property definition from a project using the provided project ID and property definition ID.
|
|
2951
2760
|
|
|
@@ -2969,7 +2778,7 @@ class PosthogApp(APIApplication):
|
|
|
2969
2778
|
response.raise_for_status()
|
|
2970
2779
|
return response.json()
|
|
2971
2780
|
|
|
2972
|
-
def property_definitions_seen_together_retrieve(self, project_id) -> Any:
|
|
2781
|
+
async def property_definitions_seen_together_retrieve(self, project_id) -> Any:
|
|
2973
2782
|
"""
|
|
2974
2783
|
Retrieves property definitions that are commonly seen together for a specified project.
|
|
2975
2784
|
|
|
@@ -2990,15 +2799,8 @@ class PosthogApp(APIApplication):
|
|
|
2990
2799
|
response.raise_for_status()
|
|
2991
2800
|
return response.json()
|
|
2992
2801
|
|
|
2993
|
-
def query_create(
|
|
2994
|
-
self,
|
|
2995
|
-
project_id,
|
|
2996
|
-
query,
|
|
2997
|
-
async_=None,
|
|
2998
|
-
client_query_id=None,
|
|
2999
|
-
filters_override=None,
|
|
3000
|
-
refresh=None,
|
|
3001
|
-
variables_override=None,
|
|
2802
|
+
async def query_create(
|
|
2803
|
+
self, project_id, query, async_=None, client_query_id=None, filters_override=None, refresh=None, variables_override=None
|
|
3002
2804
|
) -> Any:
|
|
3003
2805
|
"""
|
|
3004
2806
|
Submits a query to process or retrieve project-specific data and returns the results.
|
|
@@ -3051,7 +2853,7 @@ class PosthogApp(APIApplication):
|
|
|
3051
2853
|
response.raise_for_status()
|
|
3052
2854
|
return response.json()
|
|
3053
2855
|
|
|
3054
|
-
def query_retrieve(self, project_id, id) -> dict[str, Any]:
|
|
2856
|
+
async def query_retrieve(self, project_id, id) -> dict[str, Any]:
|
|
3055
2857
|
"""
|
|
3056
2858
|
Retrieves query details for a specific query within a project identified by the project ID and query ID.
|
|
3057
2859
|
|
|
@@ -3075,7 +2877,7 @@ class PosthogApp(APIApplication):
|
|
|
3075
2877
|
response.raise_for_status()
|
|
3076
2878
|
return response.json()
|
|
3077
2879
|
|
|
3078
|
-
def query_destroy(self, project_id, id) -> Any:
|
|
2880
|
+
async def query_destroy(self, project_id, id) -> Any:
|
|
3079
2881
|
"""
|
|
3080
2882
|
Deletes a query identified by the given ID within a specified project using the DELETE method and returns a successful response without content upon deletion.
|
|
3081
2883
|
|
|
@@ -3099,7 +2901,7 @@ class PosthogApp(APIApplication):
|
|
|
3099
2901
|
response.raise_for_status()
|
|
3100
2902
|
return response.json()
|
|
3101
2903
|
|
|
3102
|
-
def query_check_auth_for_async_create(self, project_id) -> Any:
|
|
2904
|
+
async def query_check_auth_for_async_create(self, project_id) -> Any:
|
|
3103
2905
|
"""
|
|
3104
2906
|
Checks authorization for asynchronous operations on a specified project and returns the result.
|
|
3105
2907
|
|
|
@@ -3120,7 +2922,7 @@ class PosthogApp(APIApplication):
|
|
|
3120
2922
|
response.raise_for_status()
|
|
3121
2923
|
return response.json()
|
|
3122
2924
|
|
|
3123
|
-
def query_draft_sql_retrieve(self, project_id) -> Any:
|
|
2925
|
+
async def query_draft_sql_retrieve(self, project_id) -> Any:
|
|
3124
2926
|
"""
|
|
3125
2927
|
Retrieves draft SQL queries for a specified project using the project's ID.
|
|
3126
2928
|
|
|
@@ -3141,9 +2943,7 @@ class PosthogApp(APIApplication):
|
|
|
3141
2943
|
response.raise_for_status()
|
|
3142
2944
|
return response.json()
|
|
3143
2945
|
|
|
3144
|
-
def session_recording_playlists_list(
|
|
3145
|
-
self, project_id, created_by=None, limit=None, offset=None, short_id=None
|
|
3146
|
-
) -> dict[str, Any]:
|
|
2946
|
+
async def session_recording_playlists_list(self, project_id, created_by=None, limit=None, offset=None, short_id=None) -> dict[str, Any]:
|
|
3147
2947
|
"""
|
|
3148
2948
|
Retrieves a paginated list of session recording playlists for a specified project, filtered by creator, short ID, or other parameters.
|
|
3149
2949
|
|
|
@@ -3164,20 +2964,13 @@ class PosthogApp(APIApplication):
|
|
|
3164
2964
|
raise ValueError("Missing required parameter 'project_id'")
|
|
3165
2965
|
url = f"{self.base_url}/api/projects/{project_id}/session_recording_playlists/"
|
|
3166
2966
|
query_params = {
|
|
3167
|
-
k: v
|
|
3168
|
-
for k, v in [
|
|
3169
|
-
("created_by", created_by),
|
|
3170
|
-
("limit", limit),
|
|
3171
|
-
("offset", offset),
|
|
3172
|
-
("short_id", short_id),
|
|
3173
|
-
]
|
|
3174
|
-
if v is not None
|
|
2967
|
+
k: v for k, v in [("created_by", created_by), ("limit", limit), ("offset", offset), ("short_id", short_id)] if v is not None
|
|
3175
2968
|
}
|
|
3176
2969
|
response = self._get(url, params=query_params)
|
|
3177
2970
|
response.raise_for_status()
|
|
3178
2971
|
return response.json()
|
|
3179
2972
|
|
|
3180
|
-
def session_recording_playlists_create(
|
|
2973
|
+
async def session_recording_playlists_create(
|
|
3181
2974
|
self,
|
|
3182
2975
|
project_id,
|
|
3183
2976
|
id=None,
|
|
@@ -3246,9 +3039,7 @@ class PosthogApp(APIApplication):
|
|
|
3246
3039
|
response.raise_for_status()
|
|
3247
3040
|
return response.json()
|
|
3248
3041
|
|
|
3249
|
-
def session_recording_playlists_retrieve(
|
|
3250
|
-
self, project_id, short_id
|
|
3251
|
-
) -> dict[str, Any]:
|
|
3042
|
+
async def session_recording_playlists_retrieve(self, project_id, short_id) -> dict[str, Any]:
|
|
3252
3043
|
"""
|
|
3253
3044
|
Retrieves a session recording playlist by project ID and short ID using the GET method.
|
|
3254
3045
|
|
|
@@ -3272,7 +3063,7 @@ class PosthogApp(APIApplication):
|
|
|
3272
3063
|
response.raise_for_status()
|
|
3273
3064
|
return response.json()
|
|
3274
3065
|
|
|
3275
|
-
def session_recording_playlists_update(
|
|
3066
|
+
async def session_recording_playlists_update(
|
|
3276
3067
|
self,
|
|
3277
3068
|
project_id,
|
|
3278
3069
|
short_id,
|
|
@@ -3345,7 +3136,7 @@ class PosthogApp(APIApplication):
|
|
|
3345
3136
|
response.raise_for_status()
|
|
3346
3137
|
return response.json()
|
|
3347
3138
|
|
|
3348
|
-
def session_recording_playlists_partial_update(
|
|
3139
|
+
async def session_recording_playlists_partial_update(
|
|
3349
3140
|
self,
|
|
3350
3141
|
project_id,
|
|
3351
3142
|
short_id,
|
|
@@ -3418,7 +3209,7 @@ class PosthogApp(APIApplication):
|
|
|
3418
3209
|
response.raise_for_status()
|
|
3419
3210
|
return response.json()
|
|
3420
3211
|
|
|
3421
|
-
def session_recording_playlists_destroy(self, project_id, short_id) -> Any:
|
|
3212
|
+
async def session_recording_playlists_destroy(self, project_id, short_id) -> Any:
|
|
3422
3213
|
"""
|
|
3423
3214
|
Deletes a session recording playlist in a specified project using its short identifier, returning a 405 status code (method not allowed for hard deletes).
|
|
3424
3215
|
|
|
@@ -3442,9 +3233,7 @@ class PosthogApp(APIApplication):
|
|
|
3442
3233
|
response.raise_for_status()
|
|
3443
3234
|
return response.json()
|
|
3444
3235
|
|
|
3445
|
-
def session_recording_playlists_recordings_retrieve(
|
|
3446
|
-
self, project_id, short_id
|
|
3447
|
-
) -> Any:
|
|
3236
|
+
async def session_recording_playlists_recordings_retrieve(self, project_id, short_id) -> Any:
|
|
3448
3237
|
"""
|
|
3449
3238
|
Retrieves a list of recordings associated with a specific session recording playlist in a project.
|
|
3450
3239
|
|
|
@@ -3468,7 +3257,7 @@ class PosthogApp(APIApplication):
|
|
|
3468
3257
|
response.raise_for_status()
|
|
3469
3258
|
return response.json()
|
|
3470
3259
|
|
|
3471
|
-
def session_recording_playlists_recordings_create(
|
|
3260
|
+
async def session_recording_playlists_recordings_create(
|
|
3472
3261
|
self,
|
|
3473
3262
|
project_id,
|
|
3474
3263
|
short_id,
|
|
@@ -3545,9 +3334,7 @@ class PosthogApp(APIApplication):
|
|
|
3545
3334
|
response.raise_for_status()
|
|
3546
3335
|
return response.json()
|
|
3547
3336
|
|
|
3548
|
-
def session_recording_playlists_recordings_destroy(
|
|
3549
|
-
self, project_id, short_id, session_recording_id
|
|
3550
|
-
) -> Any:
|
|
3337
|
+
async def session_recording_playlists_recordings_destroy(self, project_id, short_id, session_recording_id) -> Any:
|
|
3551
3338
|
"""
|
|
3552
3339
|
Deletes a specific session recording from a session recording playlist in a project using the provided project, playlist, and recording identifiers.
|
|
3553
3340
|
|
|
@@ -3574,9 +3361,7 @@ class PosthogApp(APIApplication):
|
|
|
3574
3361
|
response.raise_for_status()
|
|
3575
3362
|
return response.json()
|
|
3576
3363
|
|
|
3577
|
-
def session_recordings_list(
|
|
3578
|
-
self, project_id, limit=None, offset=None
|
|
3579
|
-
) -> dict[str, Any]:
|
|
3364
|
+
async def session_recordings_list(self, project_id, limit=None, offset=None) -> dict[str, Any]:
|
|
3580
3365
|
"""
|
|
3581
3366
|
Retrieves a list of session recordings for a specified project, allowing pagination through limit and offset parameters.
|
|
3582
3367
|
|
|
@@ -3594,14 +3379,12 @@ class PosthogApp(APIApplication):
|
|
|
3594
3379
|
if project_id is None:
|
|
3595
3380
|
raise ValueError("Missing required parameter 'project_id'")
|
|
3596
3381
|
url = f"{self.base_url}/api/projects/{project_id}/session_recordings/"
|
|
3597
|
-
query_params = {
|
|
3598
|
-
k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None
|
|
3599
|
-
}
|
|
3382
|
+
query_params = {k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None}
|
|
3600
3383
|
response = self._get(url, params=query_params)
|
|
3601
3384
|
response.raise_for_status()
|
|
3602
3385
|
return response.json()
|
|
3603
3386
|
|
|
3604
|
-
def session_recordings_retrieve(self, project_id, id) -> dict[str, Any]:
|
|
3387
|
+
async def session_recordings_retrieve(self, project_id, id) -> dict[str, Any]:
|
|
3605
3388
|
"""
|
|
3606
3389
|
Retrieves a specific session recording for a project identified by project_id and session ID.
|
|
3607
3390
|
|
|
@@ -3625,7 +3408,7 @@ class PosthogApp(APIApplication):
|
|
|
3625
3408
|
response.raise_for_status()
|
|
3626
3409
|
return response.json()
|
|
3627
3410
|
|
|
3628
|
-
def session_recordings_update(
|
|
3411
|
+
async def session_recordings_update(
|
|
3629
3412
|
self,
|
|
3630
3413
|
project_id,
|
|
3631
3414
|
id,
|
|
@@ -3719,7 +3502,7 @@ class PosthogApp(APIApplication):
|
|
|
3719
3502
|
response.raise_for_status()
|
|
3720
3503
|
return response.json()
|
|
3721
3504
|
|
|
3722
|
-
def session_recordings_partial_update(
|
|
3505
|
+
async def session_recordings_partial_update(
|
|
3723
3506
|
self,
|
|
3724
3507
|
project_id,
|
|
3725
3508
|
id,
|
|
@@ -3813,7 +3596,7 @@ class PosthogApp(APIApplication):
|
|
|
3813
3596
|
response.raise_for_status()
|
|
3814
3597
|
return response.json()
|
|
3815
3598
|
|
|
3816
|
-
def session_recordings_destroy(self, project_id, id) -> Any:
|
|
3599
|
+
async def session_recordings_destroy(self, project_id, id) -> Any:
|
|
3817
3600
|
"""
|
|
3818
3601
|
Deletes a specific session recording using the provided project ID and session recording ID.
|
|
3819
3602
|
|
|
@@ -3837,7 +3620,7 @@ class PosthogApp(APIApplication):
|
|
|
3837
3620
|
response.raise_for_status()
|
|
3838
3621
|
return response.json()
|
|
3839
3622
|
|
|
3840
|
-
def session_recordings_analyze_similar_retrieve(self, project_id, id) -> Any:
|
|
3623
|
+
async def session_recordings_analyze_similar_retrieve(self, project_id, id) -> Any:
|
|
3841
3624
|
"""
|
|
3842
3625
|
Analyzes a session recording for similar recordings within a specific project using the provided project ID and session recording ID.
|
|
3843
3626
|
|
|
@@ -3861,7 +3644,7 @@ class PosthogApp(APIApplication):
|
|
|
3861
3644
|
response.raise_for_status()
|
|
3862
3645
|
return response.json()
|
|
3863
3646
|
|
|
3864
|
-
def session_recordings_sharing_list(self, project_id, recording_id) -> list[Any]:
|
|
3647
|
+
async def session_recordings_sharing_list(self, project_id, recording_id) -> list[Any]:
|
|
3865
3648
|
"""
|
|
3866
3649
|
Retrieves sharing details for a specific session recording within a project.
|
|
3867
3650
|
|
|
@@ -3885,7 +3668,7 @@ class PosthogApp(APIApplication):
|
|
|
3885
3668
|
response.raise_for_status()
|
|
3886
3669
|
return response.json()
|
|
3887
3670
|
|
|
3888
|
-
def session_recordings_ai_regex_create(
|
|
3671
|
+
async def session_recordings_ai_regex_create(
|
|
3889
3672
|
self,
|
|
3890
3673
|
project_id,
|
|
3891
3674
|
id=None,
|
|
@@ -3975,7 +3758,7 @@ class PosthogApp(APIApplication):
|
|
|
3975
3758
|
response.raise_for_status()
|
|
3976
3759
|
return response.json()
|
|
3977
3760
|
|
|
3978
|
-
def sessions_property_definitions_retrieve(self, project_id) -> Any:
|
|
3761
|
+
async def sessions_property_definitions_retrieve(self, project_id) -> Any:
|
|
3979
3762
|
"""
|
|
3980
3763
|
Retrieves property definitions associated with sessions for a specified project.
|
|
3981
3764
|
|
|
@@ -3990,15 +3773,13 @@ class PosthogApp(APIApplication):
|
|
|
3990
3773
|
"""
|
|
3991
3774
|
if project_id is None:
|
|
3992
3775
|
raise ValueError("Missing required parameter 'project_id'")
|
|
3993
|
-
url =
|
|
3994
|
-
f"{self.base_url}/api/projects/{project_id}/sessions/property_definitions/"
|
|
3995
|
-
)
|
|
3776
|
+
url = f"{self.base_url}/api/projects/{project_id}/sessions/property_definitions/"
|
|
3996
3777
|
query_params = {}
|
|
3997
3778
|
response = self._get(url, params=query_params)
|
|
3998
3779
|
response.raise_for_status()
|
|
3999
3780
|
return response.json()
|
|
4000
3781
|
|
|
4001
|
-
def sessions_values_retrieve(self, project_id) -> Any:
|
|
3782
|
+
async def sessions_values_retrieve(self, project_id) -> Any:
|
|
4002
3783
|
"""
|
|
4003
3784
|
Retrieves session values for a specific project identified by its project_id.
|
|
4004
3785
|
|
|
@@ -4019,7 +3800,7 @@ class PosthogApp(APIApplication):
|
|
|
4019
3800
|
response.raise_for_status()
|
|
4020
3801
|
return response.json()
|
|
4021
3802
|
|
|
4022
|
-
def subscriptions_list(self, project_id, limit=None, offset=None) -> dict[str, Any]:
|
|
3803
|
+
async def subscriptions_list(self, project_id, limit=None, offset=None) -> dict[str, Any]:
|
|
4023
3804
|
"""
|
|
4024
3805
|
Retrieves a list of subscriptions for a specified project by project ID, allowing pagination through query parameters for limit and offset.
|
|
4025
3806
|
|
|
@@ -4037,14 +3818,12 @@ class PosthogApp(APIApplication):
|
|
|
4037
3818
|
if project_id is None:
|
|
4038
3819
|
raise ValueError("Missing required parameter 'project_id'")
|
|
4039
3820
|
url = f"{self.base_url}/api/projects/{project_id}/subscriptions/"
|
|
4040
|
-
query_params = {
|
|
4041
|
-
k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None
|
|
4042
|
-
}
|
|
3821
|
+
query_params = {k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None}
|
|
4043
3822
|
response = self._get(url, params=query_params)
|
|
4044
3823
|
response.raise_for_status()
|
|
4045
3824
|
return response.json()
|
|
4046
3825
|
|
|
4047
|
-
def subscriptions_create(
|
|
3826
|
+
async def subscriptions_create(
|
|
4048
3827
|
self,
|
|
4049
3828
|
project_id,
|
|
4050
3829
|
id,
|
|
@@ -4133,7 +3912,7 @@ class PosthogApp(APIApplication):
|
|
|
4133
3912
|
response.raise_for_status()
|
|
4134
3913
|
return response.json()
|
|
4135
3914
|
|
|
4136
|
-
def subscriptions_retrieve(self, project_id, id) -> dict[str, Any]:
|
|
3915
|
+
async def subscriptions_retrieve(self, project_id, id) -> dict[str, Any]:
|
|
4137
3916
|
"""
|
|
4138
3917
|
Retrieves details about a specific subscription within a project.
|
|
4139
3918
|
|
|
@@ -4157,7 +3936,7 @@ class PosthogApp(APIApplication):
|
|
|
4157
3936
|
response.raise_for_status()
|
|
4158
3937
|
return response.json()
|
|
4159
3938
|
|
|
4160
|
-
def subscriptions_update(
|
|
3939
|
+
async def subscriptions_update(
|
|
4161
3940
|
self,
|
|
4162
3941
|
project_id,
|
|
4163
3942
|
id,
|
|
@@ -4250,7 +4029,7 @@ class PosthogApp(APIApplication):
|
|
|
4250
4029
|
response.raise_for_status()
|
|
4251
4030
|
return response.json()
|
|
4252
4031
|
|
|
4253
|
-
def subscriptions_partial_update(
|
|
4032
|
+
async def subscriptions_partial_update(
|
|
4254
4033
|
self,
|
|
4255
4034
|
project_id,
|
|
4256
4035
|
id,
|
|
@@ -4343,7 +4122,7 @@ class PosthogApp(APIApplication):
|
|
|
4343
4122
|
response.raise_for_status()
|
|
4344
4123
|
return response.json()
|
|
4345
4124
|
|
|
4346
|
-
def subscriptions_destroy(self, project_id, id) -> Any:
|
|
4125
|
+
async def subscriptions_destroy(self, project_id, id) -> Any:
|
|
4347
4126
|
"""
|
|
4348
4127
|
Deletes a specific subscription associated with a project by its identifier.
|
|
4349
4128
|
|
|
@@ -4367,9 +4146,7 @@ class PosthogApp(APIApplication):
|
|
|
4367
4146
|
response.raise_for_status()
|
|
4368
4147
|
return response.json()
|
|
4369
4148
|
|
|
4370
|
-
def surveys_list(
|
|
4371
|
-
self, project_id, limit=None, offset=None, search=None
|
|
4372
|
-
) -> dict[str, Any]:
|
|
4149
|
+
async def surveys_list(self, project_id, limit=None, offset=None, search=None) -> dict[str, Any]:
|
|
4373
4150
|
"""
|
|
4374
4151
|
Retrieves a paginated list of surveys for a specific project with optional search and pagination parameters.
|
|
4375
4152
|
|
|
@@ -4388,16 +4165,12 @@ class PosthogApp(APIApplication):
|
|
|
4388
4165
|
if project_id is None:
|
|
4389
4166
|
raise ValueError("Missing required parameter 'project_id'")
|
|
4390
4167
|
url = f"{self.base_url}/api/projects/{project_id}/surveys/"
|
|
4391
|
-
query_params = {
|
|
4392
|
-
k: v
|
|
4393
|
-
for k, v in [("limit", limit), ("offset", offset), ("search", search)]
|
|
4394
|
-
if v is not None
|
|
4395
|
-
}
|
|
4168
|
+
query_params = {k: v for k, v in [("limit", limit), ("offset", offset), ("search", search)] if v is not None}
|
|
4396
4169
|
response = self._get(url, params=query_params)
|
|
4397
4170
|
response.raise_for_status()
|
|
4398
4171
|
return response.json()
|
|
4399
4172
|
|
|
4400
|
-
def surveys_create(
|
|
4173
|
+
async def surveys_create(
|
|
4401
4174
|
self,
|
|
4402
4175
|
project_id,
|
|
4403
4176
|
id,
|
|
@@ -4608,7 +4381,7 @@ class PosthogApp(APIApplication):
|
|
|
4608
4381
|
response.raise_for_status()
|
|
4609
4382
|
return response.json()
|
|
4610
4383
|
|
|
4611
|
-
def surveys_retrieve(self, project_id, id) -> dict[str, Any]:
|
|
4384
|
+
async def surveys_retrieve(self, project_id, id) -> dict[str, Any]:
|
|
4612
4385
|
"""
|
|
4613
4386
|
Retrieves details for a specific survey in a project using the provided ID.
|
|
4614
4387
|
|
|
@@ -4632,7 +4405,7 @@ class PosthogApp(APIApplication):
|
|
|
4632
4405
|
response.raise_for_status()
|
|
4633
4406
|
return response.json()
|
|
4634
4407
|
|
|
4635
|
-
def surveys_update(
|
|
4408
|
+
async def surveys_update(
|
|
4636
4409
|
self,
|
|
4637
4410
|
project_id,
|
|
4638
4411
|
id,
|
|
@@ -4838,7 +4611,7 @@ class PosthogApp(APIApplication):
|
|
|
4838
4611
|
response.raise_for_status()
|
|
4839
4612
|
return response.json()
|
|
4840
4613
|
|
|
4841
|
-
def surveys_partial_update(
|
|
4614
|
+
async def surveys_partial_update(
|
|
4842
4615
|
self,
|
|
4843
4616
|
project_id,
|
|
4844
4617
|
id,
|
|
@@ -5053,7 +4826,7 @@ class PosthogApp(APIApplication):
|
|
|
5053
4826
|
response.raise_for_status()
|
|
5054
4827
|
return response.json()
|
|
5055
4828
|
|
|
5056
|
-
def surveys_destroy(self, project_id, id) -> Any:
|
|
4829
|
+
async def surveys_destroy(self, project_id, id) -> Any:
|
|
5057
4830
|
"""
|
|
5058
4831
|
Deletes a survey identified by `{id}` within a project specified by `{project_id}` using the HTTP DELETE method.
|
|
5059
4832
|
|
|
@@ -5077,7 +4850,7 @@ class PosthogApp(APIApplication):
|
|
|
5077
4850
|
response.raise_for_status()
|
|
5078
4851
|
return response.json()
|
|
5079
4852
|
|
|
5080
|
-
def surveys_activity_retrieve_2(self, project_id, id) -> Any:
|
|
4853
|
+
async def surveys_activity_retrieve_2(self, project_id, id) -> Any:
|
|
5081
4854
|
"""
|
|
5082
4855
|
Retrieves the activity details for a specific survey within a project.
|
|
5083
4856
|
|
|
@@ -5101,7 +4874,7 @@ class PosthogApp(APIApplication):
|
|
|
5101
4874
|
response.raise_for_status()
|
|
5102
4875
|
return response.json()
|
|
5103
4876
|
|
|
5104
|
-
def surveys_stats_retrieve_2(self, project_id, id) -> Any:
|
|
4877
|
+
async def surveys_stats_retrieve_2(self, project_id, id) -> Any:
|
|
5105
4878
|
"""
|
|
5106
4879
|
Retrieves aggregated response statistics for a specific survey within a project.
|
|
5107
4880
|
|
|
@@ -5125,7 +4898,7 @@ class PosthogApp(APIApplication):
|
|
|
5125
4898
|
response.raise_for_status()
|
|
5126
4899
|
return response.json()
|
|
5127
4900
|
|
|
5128
|
-
def surveys_summarize_responses_create(
|
|
4901
|
+
async def surveys_summarize_responses_create(
|
|
5129
4902
|
self,
|
|
5130
4903
|
project_id,
|
|
5131
4904
|
id,
|
|
@@ -5340,7 +5113,7 @@ class PosthogApp(APIApplication):
|
|
|
5340
5113
|
response.raise_for_status()
|
|
5341
5114
|
return response.json()
|
|
5342
5115
|
|
|
5343
|
-
def surveys_activity_retrieve(self, project_id) -> Any:
|
|
5116
|
+
async def surveys_activity_retrieve(self, project_id) -> Any:
|
|
5344
5117
|
"""
|
|
5345
5118
|
Retrieves activity data for surveys associated with a specific project ID.
|
|
5346
5119
|
|
|
@@ -5361,7 +5134,7 @@ class PosthogApp(APIApplication):
|
|
|
5361
5134
|
response.raise_for_status()
|
|
5362
5135
|
return response.json()
|
|
5363
5136
|
|
|
5364
|
-
def surveys_responses_count_retrieve(self, project_id) -> Any:
|
|
5137
|
+
async def surveys_responses_count_retrieve(self, project_id) -> Any:
|
|
5365
5138
|
"""
|
|
5366
5139
|
Retrieves the count of survey responses for a specified project using the project ID.
|
|
5367
5140
|
|
|
@@ -5382,7 +5155,7 @@ class PosthogApp(APIApplication):
|
|
|
5382
5155
|
response.raise_for_status()
|
|
5383
5156
|
return response.json()
|
|
5384
5157
|
|
|
5385
|
-
def surveys_stats_retrieve(self, project_id) -> Any:
|
|
5158
|
+
async def surveys_stats_retrieve(self, project_id) -> Any:
|
|
5386
5159
|
"""
|
|
5387
5160
|
Retrieves aggregated response statistics across all surveys for a specified project, providing total counts and rates, using the "GET" method.
|
|
5388
5161
|
|
|
@@ -5403,9 +5176,7 @@ class PosthogApp(APIApplication):
|
|
|
5403
5176
|
response.raise_for_status()
|
|
5404
5177
|
return response.json()
|
|
5405
5178
|
|
|
5406
|
-
def web_experiments_list(
|
|
5407
|
-
self, project_id, limit=None, offset=None
|
|
5408
|
-
) -> dict[str, Any]:
|
|
5179
|
+
async def web_experiments_list(self, project_id, limit=None, offset=None) -> dict[str, Any]:
|
|
5409
5180
|
"""
|
|
5410
5181
|
Retrieves a list of web experiments for a specified project using the Optimizely Web Experimentation API, allowing for pagination via optional limit and offset parameters.
|
|
5411
5182
|
|
|
@@ -5423,16 +5194,12 @@ class PosthogApp(APIApplication):
|
|
|
5423
5194
|
if project_id is None:
|
|
5424
5195
|
raise ValueError("Missing required parameter 'project_id'")
|
|
5425
5196
|
url = f"{self.base_url}/api/projects/{project_id}/web_experiments/"
|
|
5426
|
-
query_params = {
|
|
5427
|
-
k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None
|
|
5428
|
-
}
|
|
5197
|
+
query_params = {k: v for k, v in [("limit", limit), ("offset", offset)] if v is not None}
|
|
5429
5198
|
response = self._get(url, params=query_params)
|
|
5430
5199
|
response.raise_for_status()
|
|
5431
5200
|
return response.json()
|
|
5432
5201
|
|
|
5433
|
-
def web_experiments_create(
|
|
5434
|
-
self, project_id, id, name, feature_flag_key, created_at=None, variants=None
|
|
5435
|
-
) -> dict[str, Any]:
|
|
5202
|
+
async def web_experiments_create(self, project_id, id, name, feature_flag_key, created_at=None, variants=None) -> dict[str, Any]:
|
|
5436
5203
|
"""
|
|
5437
5204
|
Creates a new web experiment within a specified project using the Optimizely Web Experimentation API and returns a successful creation status message.
|
|
5438
5205
|
|
|
@@ -5452,13 +5219,7 @@ class PosthogApp(APIApplication):
|
|
|
5452
5219
|
"""
|
|
5453
5220
|
if project_id is None:
|
|
5454
5221
|
raise ValueError("Missing required parameter 'project_id'")
|
|
5455
|
-
request_body = {
|
|
5456
|
-
"id": id,
|
|
5457
|
-
"name": name,
|
|
5458
|
-
"created_at": created_at,
|
|
5459
|
-
"feature_flag_key": feature_flag_key,
|
|
5460
|
-
"variants": variants,
|
|
5461
|
-
}
|
|
5222
|
+
request_body = {"id": id, "name": name, "created_at": created_at, "feature_flag_key": feature_flag_key, "variants": variants}
|
|
5462
5223
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
5463
5224
|
url = f"{self.base_url}/api/projects/{project_id}/web_experiments/"
|
|
5464
5225
|
query_params = {}
|
|
@@ -5466,7 +5227,7 @@ class PosthogApp(APIApplication):
|
|
|
5466
5227
|
response.raise_for_status()
|
|
5467
5228
|
return response.json()
|
|
5468
5229
|
|
|
5469
|
-
def web_experiments_retrieve(self, project_id, id) -> dict[str, Any]:
|
|
5230
|
+
async def web_experiments_retrieve(self, project_id, id) -> dict[str, Any]:
|
|
5470
5231
|
"""
|
|
5471
5232
|
Retrieves details about a specific web experiment defined by its ID within a specified project using the Optimizely Web Experimentation API.
|
|
5472
5233
|
|
|
@@ -5490,15 +5251,8 @@ class PosthogApp(APIApplication):
|
|
|
5490
5251
|
response.raise_for_status()
|
|
5491
5252
|
return response.json()
|
|
5492
5253
|
|
|
5493
|
-
def web_experiments_update(
|
|
5494
|
-
self,
|
|
5495
|
-
project_id,
|
|
5496
|
-
id,
|
|
5497
|
-
id_body,
|
|
5498
|
-
name,
|
|
5499
|
-
feature_flag_key,
|
|
5500
|
-
created_at=None,
|
|
5501
|
-
variants=None,
|
|
5254
|
+
async def web_experiments_update(
|
|
5255
|
+
self, project_id, id, id_body, name, feature_flag_key, created_at=None, variants=None
|
|
5502
5256
|
) -> dict[str, Any]:
|
|
5503
5257
|
"""
|
|
5504
5258
|
Updates a web experiment for a specified project using the provided ID and returns a success status upon completion.
|
|
@@ -5522,13 +5276,7 @@ class PosthogApp(APIApplication):
|
|
|
5522
5276
|
raise ValueError("Missing required parameter 'project_id'")
|
|
5523
5277
|
if id is None:
|
|
5524
5278
|
raise ValueError("Missing required parameter 'id'")
|
|
5525
|
-
request_body = {
|
|
5526
|
-
"id": id_body,
|
|
5527
|
-
"name": name,
|
|
5528
|
-
"created_at": created_at,
|
|
5529
|
-
"feature_flag_key": feature_flag_key,
|
|
5530
|
-
"variants": variants,
|
|
5531
|
-
}
|
|
5279
|
+
request_body = {"id": id_body, "name": name, "created_at": created_at, "feature_flag_key": feature_flag_key, "variants": variants}
|
|
5532
5280
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
5533
5281
|
url = f"{self.base_url}/api/projects/{project_id}/web_experiments/{id}/"
|
|
5534
5282
|
query_params = {}
|
|
@@ -5536,15 +5284,8 @@ class PosthogApp(APIApplication):
|
|
|
5536
5284
|
response.raise_for_status()
|
|
5537
5285
|
return response.json()
|
|
5538
5286
|
|
|
5539
|
-
def web_experiments_partial_update(
|
|
5540
|
-
self,
|
|
5541
|
-
project_id,
|
|
5542
|
-
id,
|
|
5543
|
-
id_body=None,
|
|
5544
|
-
name=None,
|
|
5545
|
-
created_at=None,
|
|
5546
|
-
feature_flag_key=None,
|
|
5547
|
-
variants=None,
|
|
5287
|
+
async def web_experiments_partial_update(
|
|
5288
|
+
self, project_id, id, id_body=None, name=None, created_at=None, feature_flag_key=None, variants=None
|
|
5548
5289
|
) -> dict[str, Any]:
|
|
5549
5290
|
"""
|
|
5550
5291
|
Updates specific properties of a web experiment in a project using the PATCH method, returning a successful response upon modification.
|
|
@@ -5568,13 +5309,7 @@ class PosthogApp(APIApplication):
|
|
|
5568
5309
|
raise ValueError("Missing required parameter 'project_id'")
|
|
5569
5310
|
if id is None:
|
|
5570
5311
|
raise ValueError("Missing required parameter 'id'")
|
|
5571
|
-
request_body = {
|
|
5572
|
-
"id": id_body,
|
|
5573
|
-
"name": name,
|
|
5574
|
-
"created_at": created_at,
|
|
5575
|
-
"feature_flag_key": feature_flag_key,
|
|
5576
|
-
"variants": variants,
|
|
5577
|
-
}
|
|
5312
|
+
request_body = {"id": id_body, "name": name, "created_at": created_at, "feature_flag_key": feature_flag_key, "variants": variants}
|
|
5578
5313
|
request_body = {k: v for k, v in request_body.items() if v is not None}
|
|
5579
5314
|
url = f"{self.base_url}/api/projects/{project_id}/web_experiments/{id}/"
|
|
5580
5315
|
query_params = {}
|
|
@@ -5582,7 +5317,7 @@ class PosthogApp(APIApplication):
|
|
|
5582
5317
|
response.raise_for_status()
|
|
5583
5318
|
return response.json()
|
|
5584
5319
|
|
|
5585
|
-
def web_experiments_destroy(self, project_id, id) -> Any:
|
|
5320
|
+
async def web_experiments_destroy(self, project_id, id) -> Any:
|
|
5586
5321
|
"""
|
|
5587
5322
|
Deletes a web experiment associated with a specified project using the project ID and experiment ID.
|
|
5588
5323
|
|
|
@@ -5606,7 +5341,7 @@ class PosthogApp(APIApplication):
|
|
|
5606
5341
|
response.raise_for_status()
|
|
5607
5342
|
return response.json()
|
|
5608
5343
|
|
|
5609
|
-
def users_list(self, is_staff=None, limit=None, offset=None) -> dict[str, Any]:
|
|
5344
|
+
async def users_list(self, is_staff=None, limit=None, offset=None) -> dict[str, Any]:
|
|
5610
5345
|
"""
|
|
5611
5346
|
Retrieves a list of user records from the system, filtered by staff status, with optional pagination using limit and offset parameters.
|
|
5612
5347
|
|
|
@@ -5622,16 +5357,12 @@ class PosthogApp(APIApplication):
|
|
|
5622
5357
|
users, users
|
|
5623
5358
|
"""
|
|
5624
5359
|
url = f"{self.base_url}/api/users/"
|
|
5625
|
-
query_params = {
|
|
5626
|
-
k: v
|
|
5627
|
-
for k, v in [("is_staff", is_staff), ("limit", limit), ("offset", offset)]
|
|
5628
|
-
if v is not None
|
|
5629
|
-
}
|
|
5360
|
+
query_params = {k: v for k, v in [("is_staff", is_staff), ("limit", limit), ("offset", offset)] if v is not None}
|
|
5630
5361
|
response = self._get(url, params=query_params)
|
|
5631
5362
|
response.raise_for_status()
|
|
5632
5363
|
return response.json()
|
|
5633
5364
|
|
|
5634
|
-
def users_retrieve(self, uuid) -> dict[str, Any]:
|
|
5365
|
+
async def users_retrieve(self, uuid) -> dict[str, Any]:
|
|
5635
5366
|
"""
|
|
5636
5367
|
Retrieves user data for a specific user identified by the provided UUID using the GET method.
|
|
5637
5368
|
|
|
@@ -5652,7 +5383,7 @@ class PosthogApp(APIApplication):
|
|
|
5652
5383
|
response.raise_for_status()
|
|
5653
5384
|
return response.json()
|
|
5654
5385
|
|
|
5655
|
-
def users_update(
|
|
5386
|
+
async def users_update(
|
|
5656
5387
|
self,
|
|
5657
5388
|
uuid,
|
|
5658
5389
|
date_joined,
|
|
@@ -5779,7 +5510,7 @@ class PosthogApp(APIApplication):
|
|
|
5779
5510
|
response.raise_for_status()
|
|
5780
5511
|
return response.json()
|
|
5781
5512
|
|
|
5782
|
-
def users_partial_update(
|
|
5513
|
+
async def users_partial_update(
|
|
5783
5514
|
self,
|
|
5784
5515
|
uuid,
|
|
5785
5516
|
date_joined=None,
|
|
@@ -5906,7 +5637,7 @@ class PosthogApp(APIApplication):
|
|
|
5906
5637
|
response.raise_for_status()
|
|
5907
5638
|
return response.json()
|
|
5908
5639
|
|
|
5909
|
-
def users_hedgehog_config_retrieve(self, uuid) -> Any:
|
|
5640
|
+
async def users_hedgehog_config_retrieve(self, uuid) -> Any:
|
|
5910
5641
|
"""
|
|
5911
5642
|
Retrieves the hedgehog configuration for a user identified by the specified UUID.
|
|
5912
5643
|
|
|
@@ -5927,7 +5658,7 @@ class PosthogApp(APIApplication):
|
|
|
5927
5658
|
response.raise_for_status()
|
|
5928
5659
|
return response.json()
|
|
5929
5660
|
|
|
5930
|
-
def users_hedgehog_config_partial_update(
|
|
5661
|
+
async def users_hedgehog_config_partial_update(
|
|
5931
5662
|
self,
|
|
5932
5663
|
uuid,
|
|
5933
5664
|
date_joined=None,
|
|
@@ -6054,7 +5785,7 @@ class PosthogApp(APIApplication):
|
|
|
6054
5785
|
response.raise_for_status()
|
|
6055
5786
|
return response.json()
|
|
6056
5787
|
|
|
6057
|
-
def users_scene_personalisation_create(
|
|
5788
|
+
async def users_scene_personalisation_create(
|
|
6058
5789
|
self,
|
|
6059
5790
|
uuid,
|
|
6060
5791
|
date_joined,
|
|
@@ -6181,7 +5912,7 @@ class PosthogApp(APIApplication):
|
|
|
6181
5912
|
response.raise_for_status()
|
|
6182
5913
|
return response.json()
|
|
6183
5914
|
|
|
6184
|
-
def users_start_2fa_setup_retrieve(self, uuid) -> Any:
|
|
5915
|
+
async def users_start_2fa_setup_retrieve(self, uuid) -> Any:
|
|
6185
5916
|
"""
|
|
6186
5917
|
Starts the setup process for two-factor authentication (2FA) for a user identified by their UUID.
|
|
6187
5918
|
|
|
@@ -6202,7 +5933,7 @@ class PosthogApp(APIApplication):
|
|
|
6202
5933
|
response.raise_for_status()
|
|
6203
5934
|
return response.json()
|
|
6204
5935
|
|
|
6205
|
-
def users_two_factor_backup_codes_create(
|
|
5936
|
+
async def users_two_factor_backup_codes_create(
|
|
6206
5937
|
self,
|
|
6207
5938
|
uuid,
|
|
6208
5939
|
date_joined,
|
|
@@ -6329,7 +6060,7 @@ class PosthogApp(APIApplication):
|
|
|
6329
6060
|
response.raise_for_status()
|
|
6330
6061
|
return response.json()
|
|
6331
6062
|
|
|
6332
|
-
def users_two_factor_disable_create(
|
|
6063
|
+
async def users_two_factor_disable_create(
|
|
6333
6064
|
self,
|
|
6334
6065
|
uuid,
|
|
6335
6066
|
date_joined,
|
|
@@ -6456,7 +6187,7 @@ class PosthogApp(APIApplication):
|
|
|
6456
6187
|
response.raise_for_status()
|
|
6457
6188
|
return response.json()
|
|
6458
6189
|
|
|
6459
|
-
def users_two_factor_start_setup_retrieve(self, uuid) -> Any:
|
|
6190
|
+
async def users_two_factor_start_setup_retrieve(self, uuid) -> Any:
|
|
6460
6191
|
"""
|
|
6461
6192
|
Initiates two-factor authentication setup for a user identified by their UUID, facilitating an additional security layer beyond the primary login credentials.
|
|
6462
6193
|
|
|
@@ -6477,7 +6208,7 @@ class PosthogApp(APIApplication):
|
|
|
6477
6208
|
response.raise_for_status()
|
|
6478
6209
|
return response.json()
|
|
6479
6210
|
|
|
6480
|
-
def users_two_factor_status_retrieve(self, uuid) -> Any:
|
|
6211
|
+
async def users_two_factor_status_retrieve(self, uuid) -> Any:
|
|
6481
6212
|
"""
|
|
6482
6213
|
Retrieves the two-factor authentication status for a user identified by the specified UUID using the GET method.
|
|
6483
6214
|
|
|
@@ -6498,7 +6229,7 @@ class PosthogApp(APIApplication):
|
|
|
6498
6229
|
response.raise_for_status()
|
|
6499
6230
|
return response.json()
|
|
6500
6231
|
|
|
6501
|
-
def users_two_factor_validate_create(
|
|
6232
|
+
async def users_two_factor_validate_create(
|
|
6502
6233
|
self,
|
|
6503
6234
|
uuid,
|
|
6504
6235
|
date_joined,
|
|
@@ -6625,7 +6356,7 @@ class PosthogApp(APIApplication):
|
|
|
6625
6356
|
response.raise_for_status()
|
|
6626
6357
|
return response.json()
|
|
6627
6358
|
|
|
6628
|
-
def users_validate_2fa_create(
|
|
6359
|
+
async def users_validate_2fa_create(
|
|
6629
6360
|
self,
|
|
6630
6361
|
uuid,
|
|
6631
6362
|
date_joined,
|
|
@@ -6752,7 +6483,7 @@ class PosthogApp(APIApplication):
|
|
|
6752
6483
|
response.raise_for_status()
|
|
6753
6484
|
return response.json()
|
|
6754
6485
|
|
|
6755
|
-
def users_request_email_verification_create(
|
|
6486
|
+
async def users_request_email_verification_create(
|
|
6756
6487
|
self,
|
|
6757
6488
|
date_joined,
|
|
6758
6489
|
uuid,
|
|
@@ -6875,7 +6606,7 @@ class PosthogApp(APIApplication):
|
|
|
6875
6606
|
response.raise_for_status()
|
|
6876
6607
|
return response.json()
|
|
6877
6608
|
|
|
6878
|
-
def users_verify_email_create(
|
|
6609
|
+
async def users_verify_email_create(
|
|
6879
6610
|
self,
|
|
6880
6611
|
date_joined,
|
|
6881
6612
|
uuid,
|