Zipatoapi.py 文件源码

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

项目:Zipatoapi 作者: ggruner 项目源码 文件源码
def save_and_synchronize(self, wait="false", timeout=30):
        '''
        Description:
         synchronize Zipato with the Server
        '''
        self.wait = wait
        self.timeout = timeout

        uri = "box/saveAndSynchronize?wait=" + self.wait + "&timeout=" + str(self.timeout)

        api_url = self.url + uri

        c = pycurl.Curl()
        output_init = BytesIO()

        c.setopt(c.URL, api_url)
        ### Create the cookie File
        c.setopt(pycurl.COOKIEFILE, 'cookie.txt')
        c.setopt(c.WRITEFUNCTION, output_init.write)
        c.perform()
        c.close()

        return json.loads(output_init.getvalue())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号