fitbit.py 文件源码

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

项目:weight-watchers-sync 作者: Bachmann1234 项目源码 文件源码
def get_code(client_id):
    """
    Opens a browser so the user can give us the auth code
    Args:
        client_id (str): client id for the app we want to use
    Returns:
        str: auth code user provided
    """
    url = FITBIT_PERMISSION_SCREEN.format(
        client_id=client_id,
        scope='nutrition'
    )
    webbrowser.open_new(url)
    print(
        "I am attempting to get permission to run. "
        "A browser should have just opened. If it has not please go to {}".format(
            url
        )
    )
    return input(
        "A browser should have just opened: please provide the the text after 'code=' so I can continue: "
    )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号