Module: Olibrary::Save

Included in:
Client
Defined in:
lib/olibrary/client/save.rb

Instance Method Summary collapse

Instance Method Details

#save(key, cookie, update, comment) ⇒ Object

Save changes to Open Library

key - Open Library object key cookie - Cookie retrieved by login method update - Complete, updated Open Library JSON object comment - String comment describing the changes

Note that ‘update’ can reference an external JSON file or a properly formatted Ruby object.



13
14
15
16
# File 'lib/olibrary/client/save.rb', line 13

def save(key, cookie, update, comment)
  response = update("#{key}", "#{cookie}", "#{update}", "#{comment}")
  Hashie::Mash.new(response)
end