README.md in datacite_mds-0.1.1 vs README.md in datacite_mds-0.2.0
- old
+ new
@@ -1,9 +1,10 @@
[![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)
+[![Inline docs](http://inch-ci.org/github/bodleian/datacite_mds.svg?branch=master)](http://inch-ci.org/github/bodleian/datacite_mds)
## What is it?
@@ -26,10 +27,14 @@
$ gem install datacite_mds
## Usage
+Require the gem
+
+ require 'datacite_mds'
+
create an Mds object (explicit authorization)
mds = Datacite::Mds.new authorize: {usr: "joe bloggs", pwd: "password"}
create an Mds object (implicit authorization via DATACITE_USR, DATACITE_PWD environment variables)
@@ -47,9 +52,14 @@
upload metadata
res = mds.upload_metadata File.read('metadata.xml')
p res # => <Net::HTTPCreated 201 Created readbody=true>
+
+delete metadata
+
+ res = mds.delete_metadata '10.5072/existing-doi'
+ p res # => <Net::HTTPOK 200 OK readbody=true
get all DOIs for datacentre
res = mds.get_all_dois
if res.instance_of? Net::HTTPOK