import requests
import json

# Test getting beach schedules
beach_id = "39ede4e0-7304-4999-be4e-d48d869a7a88"  # Falassarna Beach
url = f"http://localhost:8080/api/beach-schedules/{beach_id}"

print(f"Testing GET request to {url}")

try:
    response = requests.get(url)
    print(f"Status Code: {response.status_code}")
    print(f"Response: {response.text}")
    
    # Parse the JSON response
    schedules = response.json()
    print(f"Number of schedules: {len(schedules)}")
    
    if schedules:
        print("Schedules:")
        for schedule in schedules:
            print(f"  - Schedule ID: {schedule.get('schedule_id')}")
            print(f"  - From Date: {schedule.get('from_date')}")
            print(f"  - To Date: {schedule.get('to_date')}")
            print(f"  - Price: {schedule.get('price')}")
            print(f"  - VIP Price: {schedule.get('price_vip')}")
            print(f"  - Currency Symbol: {schedule.get('currency_symbol')}")
            print()
    else:
        print("No schedules found for this beach.")
        
except Exception as e:
    print(f"Error: {e}")