neography 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/CONTRIBUTORS CHANGED
@@ -3,3 +3,4 @@ Maintainer:
3
3
 
4
4
  Contributors:
5
5
  * Peter Neubauer
6
+ * Ian Dees
data/README.rdoc CHANGED
@@ -88,10 +88,10 @@ To Use:
88
88
  @neo.remove_relationship_properties(rel1, "since") # Remove one property of a relationship
89
89
  @neo.remove_relationship_properties(rel1, ["since","met"]) # Remove multiple properties of a relationship
90
90
 
91
- @neo.list_indexes # doesn't really seam to do what the api says it does
92
- @neo.add_to_index(key, value, node1) # adds a node to an index with the given key/value pair
93
- @neo.remove_from_index(key, value, node1) # removes a node to an index with the given key/value pair
94
- @neo.get_index(key, value) # gets an index with the given key/value pair
91
+ @neo.list_indexes # gives names and query templates for all defined indices
92
+ @neo.add_to_index(index, key, value, node1) # adds a node to the specified index with the given key/value pair
93
+ @neo.remove_from_index(index, key, value, node1) # removes a node from the specified index with the given key/value pair
94
+ @neo.get_index(index, key, value) # queries the specified index with the given key/value pair
95
95
 
96
96
  @neo.get_path(node1, node2, relationships, depth=4, algorithm="shortestPath") # finds the shortest path between two nodes
97
97
  @neo.get_paths(node1, node2, relationships, depth=3, algorithm="allPaths") # finds all paths between two nodes
@@ -210,20 +210,20 @@ module Neography
210
210
  end
211
211
 
212
212
  def list_indexes
213
- get("/index")
213
+ get("/index/node")
214
214
  end
215
215
 
216
- def add_to_index(key, value, id)
216
+ def add_to_index(index, key, value, id)
217
217
  options = { :body => (self.configuration + "/node/#{get_id(id)}").to_json, :headers => {'Content-Type' => 'application/json'} }
218
- post("/index/node/#{key}/#{value}", options)
218
+ post("/index/node/#{index}/#{key}/#{value}", options)
219
219
  end
220
220
 
221
- def remove_from_index(key, value, id)
222
- delete("/index/node/#{key}/#{value}/#{get_id(id)}")
221
+ def remove_from_index(index, key, value, id)
222
+ delete("/index/node/#{index}/#{key}/#{value}/#{get_id(id)}")
223
223
  end
224
224
 
225
- def get_index(key, value)
226
- index = get("/index/node/#{key}/#{value}") || Array.new
225
+ def get_index(index, key, value)
226
+ index = get("/index/node/#{index}/#{key}/#{value}") || Array.new
227
227
  return nil if index.empty?
228
228
  index
229
229
  end
@@ -373,4 +373,4 @@ module Neography
373
373
  end
374
374
 
375
375
  end
376
- end
376
+ end
@@ -1,3 +1,3 @@
1
1
  module Neography
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 7
9
- version: 0.0.7
8
+ - 8
9
+ version: 0.0.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Max De Marzi
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-11 00:00:00 -08:00
17
+ date: 2011-01-07 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency