ebsco-discovery-service-api 1.0.3 → 1.0.4

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.
@@ -13,19 +13,21 @@ module EDSApi
13
13
  # Connection object. Does what it says. ConnectionHandler is what is usually desired and wraps auto-reonnect features, etc.
14
14
  class Connection
15
15
 
16
- attr_accessor :auth_token, :session_token, :debug_notes
16
+ attr_accessor :auth_token, :session_token, :debug_notes, :guest
17
17
  attr_writer :userid, :password
18
18
 
19
19
  # Init the object with userid and pass.
20
- def uid_init(userid, password, profile)
21
- @debug_notes = ""
20
+ def uid_init(userid, password, profile, guest = 'y')
21
+ @debug_notes = "<p>Setting guest as " << guest.to_s << "</p>"
22
22
  @userid = userid
23
23
  @password = password
24
24
  @profile = profile
25
+ @guest = guest
25
26
  return self
26
27
  end
27
- def ip_init(profile)
28
+ def ip_init(profile, guest = 'y')
28
29
  @profile = profile
30
+ @guest = guest
29
31
  return self
30
32
  end
31
33
  # Auth with the server. Currently only uid auth is supported.
@@ -70,7 +72,7 @@ module EDSApi
70
72
  end
71
73
  # Create the session
72
74
  def create_session
73
- uri = URI "#{API_URL}edsapi/rest/createsession?profile=#{@profile}"
75
+ uri = URI "#{API_URL}edsapi/rest/createsession?profile=#{@profile}&guest=#{@guest}"
74
76
  req = Net::HTTP::Get.new(uri.request_uri)
75
77
  req['x-authenticationToken'] = @auth_token
76
78
  req['Accept'] = "application/json"
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.3
4
+ version: 1.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-10-28 00:00:00.000000000 Z
13
+ date: 2013-11-18 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: Set of Ruby functions to interface with the EBSCO Discovery Service API.
16
16
  email: eds@ebscohost.com