Update api_integration.py
Browse files- api_integration.py +3 -4
api_integration.py
CHANGED
@@ -3,8 +3,8 @@ import pandas as pd
|
|
3 |
|
4 |
class APIConnector:
|
5 |
def __init__(self):
|
6 |
-
self.base_url = "https://api.
|
7 |
-
self.api_key = "
|
8 |
|
9 |
def fetch_data(self, endpoint, params=None):
|
10 |
url = f"{self.base_url}/{endpoint}"
|
@@ -35,5 +35,4 @@ class APIConnector:
|
|
35 |
return response.json()
|
36 |
except requests.exceptions.RequestException as e:
|
37 |
print(f"Error posting data to API: {e}")
|
38 |
-
return None
|
39 |
-
Last edited 8 minutes ago
|
|
|
3 |
|
4 |
class APIConnector:
|
5 |
def __init__(self):
|
6 |
+
self.base_url = "https://api.aimlapi.com/v1" # Replace with actual API base URL
|
7 |
+
self.api_key = "c496d9094ba54ddb9d66eeeb35a6196f" # Replace with actual API key
|
8 |
|
9 |
def fetch_data(self, endpoint, params=None):
|
10 |
url = f"{self.base_url}/{endpoint}"
|
|
|
35 |
return response.json()
|
36 |
except requests.exceptions.RequestException as e:
|
37 |
print(f"Error posting data to API: {e}")
|
38 |
+
return None
|
|