#!/usr/bin/env python3
import json, os
import requests

key = None
for line in open(os.path.expanduser("~/.hermes/.env")):
    if line.startswith("GETXAPI_KEY="):
        key = line.split("=", 1)[1].strip()
        break
H = {"Authorization": f"Bearer {key}"}
BASE = "https://api.getxapi.com/twitter"

for ep, params in [
    ("/user/search", {"q": "documenting my app vibe coding", "count": 20}),
    ("/search/user", {"q": "vibe coding founder documentary", "count": 20}),
]:
    r = requests.get(BASE + ep, params=params, headers=H, timeout=40)
    print(f"\n{ep} -> {r.status_code}")
    txt = r.text[:600]
    print(txt)
