Beispiel #1
0
    def feed(self, feed_id):
        '''
        Returns a Feed object

        :param feed_id: the feed object
        '''
        validate_feed(feed_id)
        from stream.feed import Feed

        # generate the token
        feed_together = feed_id.replace(':', '')
        token = sign(self.api_secret, feed_together)

        return Feed(self, feed_id, token)
Beispiel #2
0
    def feed(self, feed_slug, user_id):
        '''
        Returns a Feed object

        :param feed_slug: the slug of the feed
        :param user_id: the user id
        '''
        from stream.feed import Feed
        feed_slug = validate_feed_slug(feed_slug)
        user_id = validate_user_id(user_id)

        # generate the token
        feed_id = '%s%s' % (feed_slug, user_id)
        token = sign(self.api_secret, feed_id)

        return Feed(self, feed_slug, user_id, token)
Beispiel #3
0
    def feed(self, feed_slug, user_id):
        '''
        Returns a Feed object

        :param feed_slug: the slug of the feed
        :param user_id: the user id
        '''
        from stream.feed import Feed
        feed_slug = validate_feed_slug(feed_slug)
        user_id = validate_user_id(user_id)

        # generate the token
        feed_id = '%s%s' % (feed_slug, user_id)
        token = sign(self.api_secret, feed_id)

        return Feed(self, feed_slug, user_id, token)