GuglielmoTor commited on
Commit
7eef0b7
·
verified ·
1 Parent(s): 8342c54

Update apis/Bubble_API_Calls.py

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