api.py 文件源码

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

项目:fitbit-fetch 作者: tomh05 项目源码 文件源码
def __init__(self, client_id , client_secret,
                access_token=None, refresh_token=None,
                *args, **kwargs):
        """
        Create a FitbitOauth2Client object. Specify the first 7 parameters if
        you have them to access user data. Specify just the first 2 parameters
        to start the setup for user authorization (as an example see gather_key_oauth2.py)
            - client_id, client_secret are in the app configuration page
            https://dev.fitbit.com/apps
            - access_token, refresh_token are obtained after the user grants permission
        """

        self.session = requests.Session()
        self.client_id = client_id
        self.client_secret = client_secret
        self.token = {'access_token' : access_token,
                      'refresh_token': refresh_token}
        self.oauth = OAuth2Session(client_id)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号