Skip to content

Commit 4d102bb

Browse files
authored
Update and rename APIClient.py to api.py
1 parent 06da117 commit 4d102bb

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

pipeline/APIClient.py renamed to pipeline/api.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,14 @@ def __init__(self, url="No API URL"):
2525
print(f"The API was called at: {self.timestamp}")
2626

2727
def extract_image(self, camera_id):
28-
# Debugging step to ensure camera_id is correctly parsed
29-
#print(f"Searching for camera_id: {camera_id}")
30-
3128
# Loop through the items and cameras to find the correct camera_id
3229
for item in self.metadata["items"]:
3330
for camera in item["cameras"]:
34-
# Debugging step to print the camera_id being checked
35-
#print(f"Checking camera_id: {camera['camera_id']}")
36-
3731
if camera["camera_id"] == str(camera_id):
38-
#print(f"Found camera_id: {camera_id}")
3932
return camera["image"] # Return the image URL if the camera ID matches
40-
4133
# If camera ID is not found
4234
return f"Camera ID {camera_id} not found."
4335

44-
#Debugging
45-
#client = APIClient(API_URL)
46-
#image_url = client.extract_image(1111)
47-
#print("Camera Image URL:", image_url)
4836

4937

5038

0 commit comments

Comments
 (0)