(self, sketch_id, timeline_id)
return self.to_json(analysis_history)
Handles GET request to the resource.

        Returns:
            An analysis in JSON (instance of flask.wrappers.Response)
Handles GET request to the resource.
Handles GET request to the resource .
def get(self, sketch_id, timeline_id):
        """Handles GET request to the resource.

        Returns:
            An analysis in JSON (instance of flask.wrappers.Response)
        """
        sketch = Sketch.query.get_with_acl(sketch_id)
        if not sketch:
            abort(
                HTTP_STATUS_CODE_NOT_FOUND, 'No sketch found with this ID.')

        if not sketch.has_permission(current_user, 'read'):
            abort(
                HTTP_STATUS_CODE_FORBIDDEN,
                'User does not have read access to sketch')

        timeline = Timeline.query.get(timeline_id)
        if not timeline:
            abort(
                HTTP_STATUS_CODE_NOT_FOUND, 'No timeline found with this ID.')

        analysis_history = Analysis.query.filter_by(timeline=timeline).all()

        return self.to_json(analysis_history)
def get ( self , sketch_id , timeline_id ) : sketch = Sketch . query . get_with_acl ( sketch_id ) if not sketch : abort ( HTTP_STATUS_CODE_NOT_FOUND , 'No sketch found with this ID.' ) if not sketch . has_permission ( current_user , 'read' ) : abort ( HTTP_STATUS_CODE_FORBIDDEN , 'User does not have read access to sketch' ) timeline = Timeline . query . get ( timeline_id ) if not timeline : abort ( HTTP_STATUS_CODE_NOT_FOUND , 'No timeline found with this ID.' ) analysis_history = Analysis . query . filter_by ( timeline = timeline ) . all ( ) return self . to_json ( analysis_history )