コード例 #1
0
ファイル: response.py プロジェクト: spoqa/zenpy
 def build(self, response):
     response_json = response.json()
     if 'chats' in response_json or 'docs' in response_json:
         return ChatResultGenerator(self, response_json)
     else:
         return self.api._object_mapping.object_from_json(
             'chat', response_json)
コード例 #2
0
ファイル: response.py プロジェクト: xd3262nd/zenpy
 def build(self, response):
     response_json = response.json()
     if 'chats' in response_json or 'docs' in response_json:
         if 'next_page' in response_json:
             return ChatIncrementalResultGenerator(self, response_json)
         else:
             return ChatResultGenerator(self, response_json)
     else:
         return self.object_mapping.object_from_json('chat', response_json)
コード例 #3
0
ファイル: response.py プロジェクト: xd3262nd/zenpy
 def build(self, response):
     return ChatResultGenerator(self, response.json())