Skip to content

Commit

Permalink
Neo4j API now using underscores for max_depth, prune_evaluator and re…
Browse files Browse the repository at this point in the history
…turn_filter
  • Loading branch information
maxdemarzi committed Jul 15, 2011
1 parent c95b1d7 commit d92dfae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/neography/rest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -311,19 +311,19 @@ def traverse(id, return_type, description)
options = { :body => {"order" => get_order(description["order"]),
"uniqueness" => get_uniqueness(description["uniqueness"]),
"relationships" => description["relationships"],
"prune evaluator" => description["prune evaluator"],
"return filter" => description["return filter"],
"max depth" => get_depth(description["depth"]), }.to_json, :headers => {'Content-Type' => 'application/json'} }
"prune_evaluator" => description["prune evaluator"],
"return_filter" => description["return filter"],
"max_depth" => get_depth(description["depth"]), }.to_json, :headers => {'Content-Type' => 'application/json'} }
traversal = post("/node/#{get_id(id)}/traverse/#{get_type(return_type)}", options) || Array.new
end

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

def get_paths(from, to, relationships, depth=1, algorithm="allPaths")
options = { :body => {"to" => self.configuration + "/node/#{get_id(to)}", "relationships" => relationships, "max depth" => depth, "algorithm" => get_algorithm(algorithm) }.to_json, :headers => {'Content-Type' => 'application/json'} }
options = { :body => {"to" => self.configuration + "/node/#{get_id(to)}", "relationships" => relationships, "max_depth" => depth, "algorithm" => get_algorithm(algorithm) }.to_json, :headers => {'Content-Type' => 'application/json'} }
paths = post("/node/#{get_id(from)}/paths", options) || Array.new
end

Expand Down

0 comments on commit d92dfae

Please sign in to comment.