Method: HyperGraph.post
- Defined in:
- lib/hyper_graph.rb
.post(requested_object_id, options = {}) ⇒ Object
Post an object to the graph
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/hyper_graph.rb', line 30 def post(requested_object_id, = {}) http = initialize_http_connection request_path = "/#{requested_object_id}" http_response = http.post(request_path, build_query()) if http_response.body=='true' return true else data = extract_data(JSON.parse(http_response.body)) return normalize_response(data) end end |