(self)
return return_list
Returns a list of stored graphs.
Returns a list of stored graphs.
Returns a list of stored graphs .
def list_graphs(self):
        """Returns a list of stored graphs."""
        if self.is_archived():
            raise RuntimeError(
                'Unable to list graphs on an archived sketch.')

        resource_uri = (
            f'{self.api.api_root}/sketches/{self.id}/graphs/')

        response = self.api.session.get(resource_uri)
        response_json = error.get_response_json(response, logger)
        objects = response_json.get('objects')
        if not objects:
            logger.warning('No graphs discovered.')
            return []

        return_list = []
        graph_list = objects[0]
        for graph_dict in graph_list:
            graph_obj = graph.Graph(sketch=self)
            graph_obj.from_saved(graph_dict.get('id'))
            return_list.append(graph_obj)
        return return_list
def list_graphs ( self ) : if self . is_archived ( ) : raise RuntimeError ( 'Unable to list graphs on an archived sketch.' ) resource_uri = ( f'{self.api.api_root}/sketches/{self.id}/graphs/' ) response = self . api . session . get ( resource_uri ) response_json = error . get_response_json ( response , logger ) objects = response_json . get ( 'objects' ) if not objects : logger . warning ( 'No graphs discovered.' ) return [ ] return_list = [ ] graph_list = objects [ 0 ] for graph_dict in graph_list : graph_obj = graph . Graph ( sketch = self ) graph_obj . from_saved ( graph_dict . get ( 'id' ) ) return_list . append ( graph_obj ) return return_list