def retrieve(self, uid, token, iden):
        """
        Retrieve a stream.

        :param uid: User's uid.
        :param token: Token of the user.
        :param iden: Identifier of the stream
        :return: URI, Queue name and msgs from last minute.
        """
        database = self.client[uid]
        database.authenticate(uid, token)
        collection = database['data_streams']
        # get URI
        content = collection.find_one({'_id': bson.ObjectId(iden)})
        uri = content['uri']
        queue = content['queue']

        # Get messages
        begin = time.time() - 60
        end = time.time()

        collection = database['data_streams.' + str(iden)]
        items = collection.aggregate([
            {"$match": {"resv": {"$gt": begin, "$lte": end}}},
            {"$project": {"_id": 0, "body": 1}},
            {"$sort": {"resv": 1}}
        ])['result']

        return uri, queue, list(items)
dataset/ETHPy150Open tmetsch/suricate/suricate/data/streaming.py/AMQPClient.retrieve/original