예제 #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())