Spaces:
Running
Running
Update Bubble_API_Calls.py
Browse files- Bubble_API_Calls.py +2 -2
Bubble_API_Calls.py
CHANGED
@@ -89,14 +89,14 @@ def fetch_linkedin_token_from_bubble(url_user_token_str: str):
|
|
89 |
print(status_message) # Log the final status message
|
90 |
return parsed_token_dict
|
91 |
|
92 |
-
def
|
93 |
bubble_api_key = os.environ.get("Bubble_API")
|
94 |
if not bubble_api_key:
|
95 |
error_msg = "❌ Bubble API Error: The 'Bubble_API' environment variable is not set."
|
96 |
print(error_msg)
|
97 |
return None, error_msg
|
98 |
|
99 |
-
base_url = "https://app.ingaze.ai/version-test/api/1.1/obj/
|
100 |
constraints = [{"key": "organization_urn", "constraint_type": "equals", "value": org_urn}]
|
101 |
params = {'constraints': json.dumps(constraints)}
|
102 |
headers = {"Authorization": f"Bearer {bubble_api_key}"}
|
|
|
89 |
print(status_message) # Log the final status message
|
90 |
return parsed_token_dict
|
91 |
|
92 |
+
def fetch_linkedin_posts_data_from_bubble(org_urn: str, data_type:str):
|
93 |
bubble_api_key = os.environ.get("Bubble_API")
|
94 |
if not bubble_api_key:
|
95 |
error_msg = "❌ Bubble API Error: The 'Bubble_API' environment variable is not set."
|
96 |
print(error_msg)
|
97 |
return None, error_msg
|
98 |
|
99 |
+
base_url = f"https://app.ingaze.ai/version-test/api/1.1/obj/{data_type}"
|
100 |
constraints = [{"key": "organization_urn", "constraint_type": "equals", "value": org_urn}]
|
101 |
params = {'constraints': json.dumps(constraints)}
|
102 |
headers = {"Authorization": f"Bearer {bubble_api_key}"}
|