cloud_api.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:python-cozify 作者: Artanicus 项目源码 文件源码
def lan_ip():
    """1:1 implementation of hub/lan_ip

    This call will fail with an APIError if the requesting source address is not the same as that of the hub, i.e. if they're not in the same NAT network.
    The above is based on observation and may only be partially true.

    Returns:
        list: List of Hub ip addresses.
    """
    response = requests.get(cloudBase + 'hub/lan_ip')
    if response.status_code == 200:
        return json.loads(response.text)
    else:
        raise APIError(response.status_code, response.text)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号