GuglielmoTor commited on
Commit
182a396
·
verified ·
1 Parent(s): 572271b

Update Bubble_API_Calls.py

Browse files
Files changed (1) hide show
  1. 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 fetch_posts_from_bubble(org_urn: 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 = "https://app.ingaze.ai/version-test/api/1.1/obj/LI_posts"
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}"}