README.md in datacite_mds-0.1.0 vs README.md in datacite_mds-0.1.1
- old
+ new
@@ -1,8 +1,9 @@
[![build](https://travis-ci.org/bodleian/datacite_mds.svg)](https://travis-ci.org/bodleian/datacite_mds)
[![Coverage Status](https://coveralls.io/repos/bodleian/datacite_mds/badge.svg?branch=master&service=github)](https://coveralls.io/github/bodleian/datacite_mds?branch=master)
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/bodleian/datacite_mds/blob/master/LICENSE.txt)
+[![Gem Version](https://badge.fury.io/rb/datacite_mds.svg)](https://badge.fury.io/rb/datacite_mds)
## What is it?
@@ -47,20 +48,34 @@
upload metadata
res = mds.upload_metadata File.read('metadata.xml')
p res # => <Net::HTTPCreated 201 Created readbody=true>
+get all DOIs for datacentre
+ res = mds.get_all_dois
+ if res.instance_of? Net::HTTPOK
+ p res.res.body.split # show all DOIs
+ end
+
+
mint a DOI
res = mds.mint '10.5072/non-existing-doi', 'http://ora.ox.ac.uk/objects/uuid:<an-existing-uuid>'
p res # => <Net::HTTPCreated 201 Created readbody=true>
update dataset for existing DOI
res = mds.mint '10.5072/existing-doi', 'http://ora.ox.ac.uk/objects/uuid:<new-uuid>'
p res # => <Net::HTTPCreated 201 Created readbody=true>
+
+get metadata for existing DOI
+
+ res = mds.get_metadata '10.5072/existing-doi'
+ if res.instance_of? Net::HTTPOK
+ p res.body # shows the xml metadata
+ end
## Tests
Minitest is used for testing. To run all tests, you must set the DATACITE_USR, DATACITE_PWD environment variables and then: