ebsco-discovery-service-api 1.1.1 → 1.1.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.
- checksums.yaml +8 -8
- data/lib/ebsco-discovery-service-api.rb +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
MDZjYzE0ZTJlY2IwZjJmZTQyOTc2MmI0YzJmYWMzZjliZGQ4ZjRhZQ==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
OWE0MzUwZTc0ZmI0ZTAwZDQxMTMwMmE5YjM4YzcwYjdmMTUxYTllMQ==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
YTAyM2ViZWZiZTE5NTM4MDM0ZTA4MWY1OTZmMzg4OWFiM2FmOTc0MGZmZTNk
|
|
10
|
+
MjMyMWUwOWFjMjIzNDlkOTZmYjQ1MmM5Y2QzYWVmZTMwMWNkMTI1OTYyYmYy
|
|
11
|
+
OTgzMzA5MGM1M2NlYzZlYThjZmMyZGE2ZDFkMWM5YzcwN2NmNTg=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
MjNmYTM2NjNiMTIxODEzOWVhZmEzYmZjZWVhYzA4ZDM1ZTI1NDVhNDBjNTlj
|
|
14
|
+
ZmZlMjRlMjBmMDliNDY4ZDY2YzcyZmQ5NzU2ZGExNjMwMDAxN2YyMzY0MGUw
|
|
15
|
+
ZjFiNmRlMzRkZWQyZGZiYzY1OTczZjZiNDBlODFmZjQwM2E1OWE=
|
|
@@ -122,10 +122,10 @@ module EDSApi
|
|
|
122
122
|
}
|
|
123
123
|
end
|
|
124
124
|
# Retrieve specific information
|
|
125
|
-
def retrieve(dbid, an, highlightterms = "", format = :xml)
|
|
126
|
-
uri = URI "#{API_URL}edsapi/rest/retrieve?dbid=#{dbid}&an=#{an}"
|
|
125
|
+
def retrieve(dbid, an, highlightterms = "", ebookpreferredformat = "ebook-epub", format = :xml)
|
|
126
|
+
uri = URI "#{API_URL}edsapi/rest/retrieve?dbid=#{dbid}&an=#{an}&ebookpreferredformat=#{ebookpreferredformat}"
|
|
127
127
|
if highlightterms != ""
|
|
128
|
-
uri = URI "#{API_URL}edsapi/rest/retrieve?dbid=#{dbid}&an=#{an}&highlightterms=#{highlightterms}"
|
|
128
|
+
uri = URI "#{API_URL}edsapi/rest/retrieve?dbid=#{dbid}&an=#{an}&highlightterms=#{highlightterms}&ebookpreferredformat=#{ebookpreferredformat}"
|
|
129
129
|
end
|
|
130
130
|
req = Net::HTTP::Get.new(uri.request_uri)
|
|
131
131
|
req['x-authenticationToken'] = @auth_token
|
|
@@ -240,12 +240,12 @@ module EDSApi
|
|
|
240
240
|
end
|
|
241
241
|
end
|
|
242
242
|
end
|
|
243
|
-
def retrieve(dbid, an, highlightterms, session_token, auth_token, format = :xml)
|
|
243
|
+
def retrieve(dbid, an, highlightterms, ebookpreferredformat, session_token, auth_token, format = :xml)
|
|
244
244
|
attempts = 0
|
|
245
245
|
@session_token = session_token
|
|
246
246
|
@auth_token = auth_token
|
|
247
247
|
loop do
|
|
248
|
-
result = JSON.parse(super(dbid, an, highlightterms, format))
|
|
248
|
+
result = JSON.parse(super(dbid, an, highlightterms, ebookpreferredformat, format))
|
|
249
249
|
if result.has_key?('ErrorNumber')
|
|
250
250
|
case result['ErrorNumber']
|
|
251
251
|
when "108"
|