Method: Neography::Rest::NodeIndexes#create_unique_node

Defined in:
lib/neography/rest/node_indexes.rb

#create_unique_node(index, key, value, properties = {}) ⇒ Object



96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/neography/rest/node_indexes.rb', line 96

def create_unique_node(index, key, value, properties = {})
  options = {
    :body => (
      { :properties => properties,
        :key => key,
        :value => value
      }
    ).to_json,
    :headers => json_content_type
  }
  @connection.post("/index/node/%{index}?unique" % {:index => index}, options)
end