Created
January 8, 2014 05:35
-
-
Save smoovej/8312307 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From: /Users/smoovej/Sites/conspire-www/app/models/graph_resource/person.rb @ line 30 GraphResource::Person.create_person: | |
27: def self.create_person( hash ) | |
28: | |
29: response = self.api_post( "", hash ) | |
=> 30: binding.pry | |
31: if response.code == 201 | |
32: return response.parsed_response | |
33: else | |
34: raise response.response | |
35: end | |
36: | |
37: end | |
[1] pry(GraphResource::Person)> response | |
=> {"node_id"=>123456, | |
"user_id"=>123, | |
"node_type"=>"person", | |
"name"=>"Kara Thrace", | |
"connectedness"=>345678.9, | |
"addresses"=>["starbuck@galactica.com", "kara.thrace@caprica.org"]} | |
[2] pry(GraphResource::Person)> c | |
2/3 |================ 66 ================> | ETA: 00:00:05 | |
Frame number: 0/35 | |
From: /Users/smoovej/Sites/conspire-www/app/models/graph_resource/person.rb @ line 44 GraphResource::Person.add_to_network: | |
39: def self.add_to_network( person_id, network_id ) | |
40: | |
41: network_id_hash = { "network_id" => network_id } | |
42: | |
43: response = self.api_put( "/#{person_id}/networks", network_id_hash ) | |
=> 44: binding.pry | |
45: if response.code == 201 | |
46: return JSON.parse( response.parsed_response ) | |
47: else | |
48: raise response.response | |
49: end | |
50: | |
51: end | |
[1] pry(GraphResource::Person)> response | |
=> " {\n \"node_id\": 123456,\n \"user_id\": 123, \n \"node_type\": \"person\",\n \"name\": \"Kara Thrace\",\n \"connectedness\": 345678.9, \n \"addresses\": [\"starbuck@galactica.com\",\"kara.thrace@caprica.org\"]\n }" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment