Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add_label clarifications #100

Closed
fbrolli opened this issue Jul 11, 2013 · 5 comments
Closed

add_label clarifications #100

fbrolli opened this issue Jul 11, 2013 · 5 comments

Comments

@fbrolli
Copy link

fbrolli commented Jul 11, 2013

Hi, I'm trying to use the add_label method, and I have some questions :

  1. is there any way to use it in phase 2?
  2. documentation states that you have to do @neo.add_label(node, "Person"), but this keeps sending me a 404. So I looked into the code and it seems that it has to be @neo.add_label(node.neo_id, "Person"). Is this right?
  3. Is there any way to create a node and automatically label it?

Thank you for your work

@fbrolli
Copy link
Author

fbrolli commented Jul 11, 2013

I can answer myself question 3, it can be done using batches :)

@karabijavad
Copy link
Contributor

It looks like i am also having to pass the id of the node, as opposed to the node object which neography seems to be using, to add_label.

I simply created a wrapper function:

def giveLabel(node, label)
    id = node["self"].match(/[^\/]+$/)
    @neo.set_label(id, label)
end

then i use giveLabel(node, "Blah")

If @maxdemarzi is interested, id love to work on this, but im not sure if this is intended behaviour?

correction, the 'node' i am passing into giveLabel is a value retrieved from phase 1, not phase 2.

@pboling
Copy link
Contributor

pboling commented Aug 13, 2013

See this pull request for relevant discussion.

@blim8183
Copy link

blim8183 commented Dec 5, 2013

@fbrolli Can you give an example of how you're creating a node and automatically labeling it using batches?

@fbrolli
Copy link
Author

fbrolli commented Dec 5, 2013

I'm sorry but I gave up using neography months ago, so I do not remember
what I did precisely and I do not have example code.
Il 05/dic/2013 20:25 "Benjamin Lim" [email protected] ha scritto:

@fbrolli https://github.com/fbrolli Can you give an example of how
you're creating a node and automatically labeling it using batches?


Reply to this email directly or view it on GitHubhttps://github.com//issues/100#issuecomment-29928851
.

willkessler pushed a commit to willkessler/neography that referenced this issue Apr 21, 2014
Type cast date to string yyyy-mm-dd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants