Beispiel #1
0
    def _postproc(self, request):
        """Makes necessary modifications to user data and
        sets up a stream.

        :param request: request object
        :type request: request
        """
        if request.status_code != 200:
            raise Exception('wrong error code: {0}'.format(
                request.status_code))
        else:
            request = request.json()
        if not len(request):
            raise errors.UserError(
                'cannot extract user data: no posts to analyze')
        self.data = self._finalize_data(request[0]['author'])
        self.stream = Outer(self._connection,
                            location='people/{0}.json'.format(self['guid']))
Beispiel #2
0
 def _fetchstream(self):
     self.stream = Outer(self._connection,
                         location='people/{0}.json'.format(self['guid']))
Beispiel #3
0
 def _fetchstream(self):
     self.stream = Outer(self._connection, guid=self['guid'])