feat(so-sync): final round-trip tools and infrastructure fixes
This commit is contained in:
@@ -3,7 +3,7 @@ from dotenv import load_dotenv
|
||||
import urllib.parse
|
||||
|
||||
def generate_url():
|
||||
load_dotenv(dotenv_path="../.env")
|
||||
load_dotenv(dotenv_path="/home/node/clawd/.env")
|
||||
|
||||
client_id = os.getenv("SO_CLIENT_ID") or os.getenv("SO_SOD")
|
||||
redirect_uri = "https://devnet-tools.superoffice.com/openid/callback" # Das muss im Portal so registriert sein
|
||||
|
||||
28
connector-superoffice/test_client.py
Normal file
28
connector-superoffice/test_client.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# test_client.py
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
from superoffice_client import SuperOfficeClient
|
||||
|
||||
print("--- Testing Core SuperOfficeClient ---")
|
||||
|
||||
# Load environment variables from the root .env file
|
||||
load_dotenv(dotenv_path="/home/node/clawd/.env")
|
||||
|
||||
try:
|
||||
# Initialize the client
|
||||
client = SuperOfficeClient()
|
||||
|
||||
# Perform a simple read operation
|
||||
person_id = 1
|
||||
print(f"Fetching person with ID: {person_id}...")
|
||||
person_data = client.get_person(person_id)
|
||||
|
||||
if person_data:
|
||||
print(f"✅ SUCCESS! Found Person: {person_data.get('firstname')} {person_data.get('lastname')}")
|
||||
else:
|
||||
print(f"❌ ERROR: Could not fetch person {person_id}, but connection was successful.")
|
||||
|
||||
except Exception as e:
|
||||
print(f"❌ FATAL ERROR during client initialization or request: {e}")
|
||||
|
||||
print("--- Test complete ---")
|
||||
Reference in New Issue
Block a user