-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Having played around with the API, I am able to add an author to an RO-Crate like this:
crate = ROCrate::Crate.new
crate.add_person('https://orcid.org/0000-0002-1825-0097', { name: 'Josiah Carberry' })
crate.metadata.properties['author'] = {'@id'=>'https://orcid.org/0000-0002-1825-0097'}The README implies that there are shortcuts for common properties - it has an example using file.author where file is a data entity - but I don't think this method exists in the API.
I tried to logically reproduce this kind of approach by creating a variable for my person and then adding that:
crate = ROCrate::Crate.new
author = crate.add_person('https://orcid.org/0000-0002-1825-0097', { name: 'Josiah Carberry' })
crate.metadata.properties['author'] = authorbut this does not work.
Is my first example the best approach to this? And is the README just a little out of date?
Metadata
Metadata
Assignees
Labels
No labels