#!/bin/bash # Test script for contact list endpoints PHONE_IP="${PHONE_IP:-10.0.0.193}" BASE_URL="http://${PHONE_IP}:5001" echo "==================================================" echo "Testing Termux Contact List API" echo "==================================================" echo "" echo "1. Testing /api/contacts/test endpoint..." echo " This will show us the raw JSON structure" echo "" curl -s "${BASE_URL}/api/contacts/test" | python3 -m json.tool echo "" echo "" echo "==================================================" echo "2. Testing /api/contacts/list endpoint..." echo " This will fetch all contacts" echo "" curl -s "${BASE_URL}/api/contacts/list" | python3 -m json.tool | head -50 echo "" echo "==================================================" echo "Done! Check the output above to see:" echo " - What fields are available (name, number, etc.)" echo " - The JSON structure" echo " - Total contact count" echo "=================================================="