コード例 #1
0
ファイル: server.py プロジェクト: StepicOrg/vimeo.py
    def get(self):
        """
        Demonstrates asynchronous use of VimeoClient via tornado.gen

        The caller must be decorated by tornado.gen.coroutine
        The call to an API function must include the async kwarg set to True
        The result must be yielded before assignment
        """
        vimeo = VimeoClient("YOUR ACCESS TOKEN")
        res = yield vimeo.users(query='cats', async=True)
        self.write(res)
        self.finish()
コード例 #2
0
    def get(self):
        """
        Demonstrates asynchronous use of VimeoClient via tornado.gen

        The caller must be decorated by tornado.gen.coroutine
        The call to an API function must include the async kwarg set to True
        The result must be yielded before assignment
        """
        vimeo = VimeoClient("YOUR ACCESS TOKEN")
        res = yield vimeo.users(query='cats', async=True)
        self.write(res)
        self.finish()