examples/password_reset.rb in archivesspace-client-0.1.7 vs examples/password_reset.rb in archivesspace-client-0.1.8
- old
+ new
@@ -2,16 +2,15 @@
$LOAD_PATH.unshift File.expand_path('../lib', __dir__)
require 'awesome_print'
require 'archivesspace/client'
-username = 'mrx'
-password = '123456'
+username = 'admin'
+password = 'admin'
# default client connection: localhost:8089, admin, admin
client = ArchivesSpace::Client.new.login
begin
- client.password_reset username, password
- puts "Successfully updated password for #{username}."
+ puts client.password_reset(username, password).parsed
rescue StandardError => e
puts "Failed to update password for #{username},\n#{e.message}"
end