import requests
from .auth import TokenManager

def get_json(url: str, tm: TokenManager) -> object:
    token = tm.get_token()
    r = requests.get(
        url,
        headers={"accept": "application/json", "Authorization": f"Bearer {token}"},
        timeout=10,
        verify=tm.verify_tls,
    )
    r.raise_for_status()
    return r.json()
