def get_services(api):
    try:
        req = api(METHOD_GET, URL_API_SERVICES)

        return req.json() if req.status_code == 200 else {}

    except (HomeAssistantError, ValueError):
        # ValueError if req.json() can't parse the json
        _LOGGER.exception("Got unexpected services result")

        return {}
Return a list of dicts.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/remote.py/get_services