Very cool,
that was fast turnaround! It seems if the node["data"]["age"] and
@neo.get_id(node) methods move to the nodes themselves, the whole
things looks almost identical to the native API, as Andreas is
noticing,

node["age"]
node.id

I'm always amazed by how little code there is in Ruby. Grmpf.

Good work Max! Btw, do you all think there should be an @neo.deleteAll
function for testing and getting a clean slate? That maybe could be
expressed in the REST API from the server in order to minimize
roundtrips ... useful?

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Sun, Nov 21, 2010 at 9:27 PM, Max De Marzi Jr. <maxdema...@gmail.com> wrote:
> Ok, it's in 0.0.3
>
> I'm not returning proper objects, but instead just added a get_id
> method that will take a hash, a string or a number and figure out it's
> id.
>
> So your code above runs.
>
>
> On Sun, Nov 21, 2010 at 4:16 AM, Peter Neubauer
> <peter.neuba...@neotechnology.com> wrote:
>> Very cool Max!
>>
>> WDYT about adding a node and relationship representation other than
>> the response body to the return values? I would love to do this:
>>
>> require 'rubygems'
>> require "neography"
>>
>>
>> @neo = Neography::Rest.new()
>> max = @neo.create_node("age" => 31, "name" => "Max")
>> puts max
>> peter = @neo.create_node("name" => "Peter")
>> puts peter
>> @neo.create_relationship("friends", max, peter)
>>
>> Do you think that is easy to do?
>>
>> Cheers,
>>
>> /peter neubauer
>>
>> GTalk:      neubauer.peter
>> Skype       peter.neubauer
>> Phone       +46 704 106975
>> LinkedIn   http://www.linkedin.com/in/neubauer
>> Twitter      http://twitter.com/peterneubauer
>>
>> http://www.neo4j.org               - Your high performance graph database.
>> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>>
>>
>>
>> On Sat, Nov 20, 2010 at 11:19 PM, Max De Marzi Jr. <maxdema...@gmail.com> 
>> wrote:
>>> My idea was to just get a simple Rest wrapper started, and then build
>>> it out proper Node, Relationship and etc. sticking to the conventions
>>> you have already created with neo4j.rb.
>>> I originally started down that path, but then decided to build a base
>>> layer first, and then get help building on top of that ( I don't have
>>> your mad ruby skills).
>>>
>>> Using the Rest API is limited (at this point) so there's only so much
>>> we can do.
>>> I think Neography can work for simple scenarios and be a gateway to 
>>> Neo4j.rb.
>>>
>>> I'll add that to the readme.
>>>
>>>
>>> On Sat, Nov 20, 2010 at 3:30 PM, Andreas Ronge <andreas.ro...@gmail.com> 
>>> wrote:
>>>> Hi
>>>>
>>>> That's interesting !
>>>> Would be cool to try to use the same API as neo4j.rb.
>>>> But I think only a small part of the neo4j.rb API would be possible to
>>>> implement using the REST API.
>>>> Example, the traversals (which is done in javascript) and
>>>> indexing/rules which uses the event framework would be impossible to
>>>> implement (?)
>>>>
>>>> /Andreas
>>>>
>>>>
>>>>
>>>> On Sat, Nov 20, 2010 at 5:10 PM, Peter Neubauer
>>>> <peter.neuba...@neotechnology.com> wrote:
>>>>> Hi all,
>>>>> follow Max's comment on the Neo4j Server announcement,
>>>>> https://rubygems.org/gems/neography I just wanted to point out his
>>>>> Ruby bindings at
>>>>>
>>>>> https://github.com/maxdemarzi/neography
>>>>>
>>>>> Feel free to try it out and add some short intro on the Wiki,
>>>>> http://wiki.neo4j.org/content/Getting_Started, otherwise I can do it
>>>>> next week ...
>>>>>
>>>>> Cheers,
>>>>>
>>>>> /peter neubauer
>>>>>
>>>>> GTalk:      neubauer.peter
>>>>> Skype       peter.neubauer
>>>>> Phone       +46 704 106975
>>>>> LinkedIn   http://www.linkedin.com/in/neubauer
>>>>> Twitter      http://twitter.com/peterneubauer
>>>>>
>>>>> http://www.neo4j.org               - Your high performance graph database.
>>>>> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google Groups 
>>>>> "neo4jrb" group.
>>>>> To post to this group, send email to neo4...@googlegroups.com.
>>>>> To unsubscribe from this group, send email to 
>>>>> neo4jrb+unsubscr...@googlegroups.com.
>>>>> For more options, visit this group at 
>>>>> http://groups.google.com/group/neo4jrb?hl=en.
>>>>>
>>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google Groups 
>>>> "neo4jrb" group.
>>>> To post to this group, send email to neo4...@googlegroups.com.
>>>> To unsubscribe from this group, send email to 
>>>> neo4jrb+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at 
>>>> http://groups.google.com/group/neo4jrb?hl=en.
>>>>
>>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "neo4jrb" group.
>>> To post to this group, send email to neo4...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> neo4jrb+unsubscr...@googlegroups.com.
>>> For more options, visit this group at 
>>> http://groups.google.com/group/neo4jrb?hl=en.
>>>
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "neo4jrb" group.
>> To post to this group, send email to neo4...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> neo4jrb+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/neo4jrb?hl=en.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "neo4jrb" group.
> To post to this group, send email to neo4...@googlegroups.com.
> To unsubscribe from this group, send email to 
> neo4jrb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/neo4jrb?hl=en.
>
>
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to