Skip to content

Commit

Permalink
documentation changes, use shortest path as default for path
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdemarzi committed Nov 20, 2010
1 parent e42beda commit 4e1cf8f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ To Use:
@neo.remove_from_index(key, value, id) # removes a node to an index with the given key/value pair
@neo.get_index(key, value) # gets an index with the given key/value pair

@neo.get_path(from, to, relationships, depth=4, algorithm="shortestPath") # finds the shortest path between two nodes
@neo.get_paths(from, to, relationships, depth=3, algorithm="allPaths") # finds all paths between two nodes

=== To Do

Path tests
Traverse tests
@neo.traverse()
examples

=== License

* Neography - MIT, see the LICENSE file http://github.com/maxdemarzi/neography/tree/master/LICENSE.
Expand Down
2 changes: 1 addition & 1 deletion lib/neography/rest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def get_index(key, value)
index
end

def get_path(from, to, relationships, depth=1, algorithm="allPaths")
def get_path(from, to, relationships, depth=1, algorithm="shortestPath")
options = { :body => {"to" => self.configuration + "/node/#{to}", "relationships" => relationships, "max depth" => depth, "algorithm" => get_algorithm(algorithm) }.to_json, :headers => {'Content-Type' => 'application/json'} }
path = post("/node/#{from}/path", options) || Hash.new
end
Expand Down

0 comments on commit 4e1cf8f

Please sign in to comment.