lib/bolognese/readers/datacite_reader.rb in bolognese-0.9.61 vs lib/bolognese/readers/datacite_reader.rb in bolognese-0.9.62

- old
+ new

@@ -4,11 +4,11 @@ def get_datacite(id: nil, **options) return nil unless id.present? doi = doi_from_url(id) search_url = doi_search(id, options) - search_url += "?q=doi:#{doi}&fl=doi,url,xml,allocator_symbol,datacentre_symbol,media,minted,updated&wt=json" + search_url += "?q=doi:#{doi}&fl=doi,url,xml,state,allocator_symbol,datacentre_symbol,media,minted,updated&wt=json" response = Maremma.get search_url attributes = response.body.dig("data", "response", "docs").first return nil unless attributes.present? @@ -29,9 +29,10 @@ string = doc.to_s end { "string" => string, "url" => attributes.fetch("url", nil), + "state" => attributes.fetch("state", nil), "date_registered" => attributes.fetch("minted", nil), "date_updated" => attributes.fetch("updated", nil), "provider_id" => attributes.fetch("allocator_symbol", nil), "client_id" => attributes.fetch("datacentre_symbol", nil) } end