#!/bin/bash
# Simple test script for Telegrammer API
# NOTE: This requires Telegrammer to be running.
API_URL="http://localhost:8080"
echo "Testing /subscribe..."
curl -X POST "$API_URL/subscribe" \
-H "Content-Type: application/json" \
-d '{"chat_id": 12345, "callback_url": "http://localhost:9090/webhook"}'
echo -e "\n"
echo "Testing /send with username (requires prior message from user)..."
curl -X POST "$API_URL/send" \
-H "Content-Type: application/json" \
-d '{"username": "some_user", "text": "Test message to username"}'
echo -e "\n"