ebsco-discovery-service-api 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -116,8 +116,11 @@ module EDSApi
116
116
  }
117
117
  end
118
118
  # Retrieve specific information
119
- def retrieve(dbid, an, format = :xml)
119
+ def retrieve(dbid, an, highlightterms = "", format = :xml)
120
120
  uri = URI "#{API_URL}edsapi/rest/retrieve?dbid=#{dbid}&an=#{an}"
121
+ if highlightterms != ""
122
+ uri = URI "#{API_URL}edsapi/rest/retrieve?dbid=#{dbid}&an=#{an}&highlightterms=#{highlightterms}"
123
+ end
121
124
  req = Net::HTTP::Get.new(uri.request_uri)
122
125
  req['x-authenticationToken'] = @auth_token
123
126
  req['x-sessionToken'] = @session_token
@@ -227,12 +230,12 @@ module EDSApi
227
230
  end
228
231
  end
229
232
  end
230
- def retrieve(dbid, an, session_token, auth_token, format = :xml)
233
+ def retrieve(dbid, an, highlightterms, session_token, auth_token, format = :xml)
231
234
  attempts = 0
232
235
  @session_token = session_token
233
236
  @auth_token = auth_token
234
237
  loop do
235
- result = JSON.parse(super(dbid, an, format))
238
+ result = JSON.parse(super(dbid, an, highlightterms, format))
236
239
  if result.has_key?('ErrorNumber')
237
240
  case result['ErrorNumber']
238
241
  when "108"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ebsco-discovery-service-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: