app/service_adaptors/isi.rb in umlaut-4.0.3 vs app/service_adaptors/isi.rb in umlaut-4.1.0.pre.alpha.1
- old
+ new
@@ -9,12 +9,13 @@
#
# You need to register for the the Thomson 'Links Article Match Retrieval'
# (LAMR) service api, which is used here. To register, see:
# http://wokinfo.com/products_tools/products/related/amr/
#
-# You register by IP address, so no API key is needed once your registration
-# goes through.
+# You can register by IP address, so no auth key is needed once your registration
+# goes through -- or fill out 'username' and 'password' config elements in service
+# setup, and they will be used.
#
# If you later need to change the IP addresses entitled to use this API, use
# http://scientific.thomson.com/scientific/techsupport/cpe/form.html.
# to request a change.
#
@@ -124,11 +125,20 @@
builder.instruct!(:xml, :encoding => "UTF-8")
builder.request(:xmlns => "http://www.isinet.com/xrpc41", :src => "app.id=Umlaut") do
builder.fn(:name => "LinksAMR.retrieve") do
builder.list do
- # first map is authentication info. empty 'map' element since we are IP authenticated.
- builder.map
+ # first map is authentication info. empty 'map' element if we are IP authenticated.
+ if @username && @password
+ builder.map do
+ builder.val(@username, :name => "username")
+ builder.val(@password, :name => "password")
+ end
+ else
+ builder.map
+ end
+
+
# specify what we're requesting
builder.map do
builder.list(:name=>"WOS") do
builder.val("timesCited")
builder.val("ut")