#NEWLINE# @ classmethod #NEWLINE# def extended_follow( cls , start_vertex , edge_collection , graph_name = None , **kwargs ) : #NEWLINE# #INDENT# '\n\n            :param start_vertex id of the startVertex, e.g. "users/foo".\n            :param edge_collection *Deprecated* name of the collection that contains the edges.\n            :param graph_name name of the graph that contains the edges.\n\n            Optionals:\n            :param filter  (optional, default is to include all nodes): body (JavaScript code) of custom filter\n            function function signature: (config, vertex, path) -> mixed can return four different string values:\n            - "exclude" -> this vertex will not be visited.\n            - "prune" -> the edges of this vertex will not be followed.\n            - "" or undefined -> visit the vertex and follow it\'s edges.\n            - Array -> containing any combination of the above. If there is at least one "exclude" or "prune"\n            respectively is contained, it\'s effect will occur.\n\n            :param min_depth (optional, ANDed with any existing filters): visits only nodes in at least the given depth\n            :param max_depth  (optional, ANDed with any existing filters): visits only nodes in at most the given depth\n\n            :param visitor  (optional): body (JavaScript) code of custom visitor function function signature:\n            (config, result, vertex, path) -> void visitor function can do anything, but its return value is ignored.\n            To populate a result, use the result variable by reference\n\n            :param direction  (optional): direction for traversal - if set, must be either\n            "outbound", "inbound", or "any" - if not set, the expander attribute must be specified\n\n            :param init (optional): body (JavaScript) code of custom result initialisation function function signature:\n            (config, result) -> void initialise any values in result with what is required\n\n            :param expander (optional): body (JavaScript) code of custom expander function must be set if direction\n            attribute is *not* set function signature: (config, vertex, path) -> array expander must return an array\n            of the connections for vertex each connection is an object with the attributes edge and vertex\n\n            :param sort (optional): body (JavaScript) code of a custom comparison function for the edges.\n            The signature of this function is (l, r) -> integer (where l and r are edges) and must return -1 if l\n            is smaller than, +1 if l is greater than, and 0 if l and r are equal. The reason for this is the following:\n            The order of edges returned for a certain vertex is undefined. This is because there is no natural order\n            of edges for a vertex with multiple connected edges. To explicitly define the order in which edges on\n            the vertex are followed, you can specify an edge comparator function with this attribute. Note that the\n            value here has to be a string to conform to the JSON standard, which in turn is parsed as function body\n            on the server side. Furthermore note that this attribute is only used for the standard expanders. If\n            you use your custom expander you have to do the sorting yourself within the expander code.\n\n            :param strategy (optional): traversal strategy can be "depthfirst" or "breadthfirst"\n            :param order (optional): traversal order can be "preorder" or "postorder"\n            :param item_order (optional): item iteration order can be "forward" or "backward"\n\n            :param uniqueness (optional): specifies uniqueness for vertices and edges visited if set, must be an object\n            like this: "uniqueness": {"vertices": "none"|"global"|path", "edges": "none"|"global"|"path"}\n\n            :param max_iterations (optional): Maximum number of iterations in each traversal.\n            This number can be set to prevent endless loops in traversal of cyclic graphs. When a traversal\n            performs as many iterations as the max_iterations value, the traversal will abort with an error.\n            If max_iterations is not set, a server-defined value may be used.\n        ' #NEWLINE# request_data = { #NEWLINE# #INDENT# 'startVertex' : start_vertex , #NEWLINE# 'edgeCollection' : edge_collection , #NEWLINE# #UNINDENT# } #NEWLINE# if graph_name : #NEWLINE# #INDENT# request_data [ 'graphName' ] = graph_name #NEWLINE# #UNINDENT# option_name = 'filter' #NEWLINE# if ( option_name in kwargs ) : #NEWLINE# #INDENT# request_data [ 'filter' ] = kwargs [ option_name ] #NEWLINE# #UNINDENT# option_name = 'min_depth' #NEWLINE# if ( option_name in kwargs ) : #NEWLINE# #INDENT# request_data [ 'minDepth' ] = kwargs [ option_name ] #NEWLINE# #UNINDENT# option_name = 'max_depth' #NEWLINE# if ( graph_name in kwargs ) : #NEWLINE# #INDENT# request_data [ 'maxDepth' ] = kwargs [ option_name ] #NEWLINE# #UNINDENT# option_name = 'visitor' #NEWLINE# if ( option_name in kwargs ) : #NEWLINE# #INDENT# request_data [ 'visitor' ] = kwargs [ option_name ] #NEWLINE# #UNINDENT# option_name = 'direction' #NEWLINE# if ( option_name in kwargs ) : #NEWLINE# #INDENT# request_data [ 'direction' ] = kwargs [ option_name ] #NEWLINE# #UNINDENT# option_name = 'init' #NEWLINE# if ( option_name in kwargs ) : #NEWLINE# #INDENT# request_data [ 'init' ] = kwargs [ option_name ] #NEWLINE# #UNINDENT# option_name = 'expander' #NEWLINE# if ( option_name in kwargs ) : #NEWLINE# #INDENT# request_data [ 'expander' ] = kwargs [ option_name ] #NEWLINE# #UNINDENT# option_name = 'sort' #NEWLINE# if ( option_name in kwargs ) : #NEWLINE# #INDENT# request_data [ 'sort' ] = kwargs [ option_name ] #NEWLINE# #UNINDENT# option_name = 'strategy' #NEWLINE# if ( option_name in kwargs ) : #NEWLINE# #INDENT# request_data [ 'strategy' ] = kwargs [ option_name ] #NEWLINE# #UNINDENT# option_name = 'order' #NEWLINE# if ( option_name in kwargs ) : #NEWLINE# #INDENT# request_data [ 'order' ] = kwargs [ option_name ] #NEWLINE# #UNINDENT# option_name = 'item_order' #NEWLINE# if ( option_name in kwargs ) : #NEWLINE# #INDENT# request_data [ 'itemOrder' ] = kwargs [ option_name ] #NEWLINE# #UNINDENT# option_name = 'uniqueness' #NEWLINE# if ( option_name in kwargs ) : #NEWLINE# #INDENT# request_data [ 'uniqueness' ] = kwargs [ option_name ] #NEWLINE# #UNINDENT# option_name = 'max_iterations' #NEWLINE# if ( option_name in kwargs ) : #NEWLINE# #INDENT# request_data [ 'maxIterations' ] = kwargs [ option_name ] #NEWLINE# #UNINDENT# if ( ( not ( 'direction' in kwargs ) ) and ( not ( 'expander' in kwargs ) ) ) : #NEWLINE# #INDENT# raise Exception ( 'Either direction or expander have to be set' ) #NEWLINE# #UNINDENT# if ( ( 'direction' in kwargs ) and ( 'expander' in kwargs ) ) : #NEWLINE# #INDENT# raise Exception ( 'Either direction or expander have to be set' ) #NEWLINE# #UNINDENT# return Traveser . _send_follow ( request_data = request_data )