Initial commit

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Todd
2026-03-29 22:42:55 -04:00
commit 0d7b2b1aab
389 changed files with 280296 additions and 0 deletions

17
scripts/api-call.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
# Make authenticated API calls using saved token
# Usage: /opt/media-downloader/scripts/api-call.sh "/api/endpoint?params"
#
# First run get-api-token.sh to get a token, then use this script.
# Example: /opt/media-downloader/scripts/api-call.sh "/api/video-queue?limit=2"
ENDPOINT="$1"
shift
if [ ! -f /tmp/api_token.txt ]; then
echo "No token found. Run get-api-token.sh first."
exit 1
fi
TOKEN=$(cat /tmp/api_token.txt)
curl -s "http://localhost:8000${ENDPOINT}" -b "auth_token=$TOKEN" "$@"