tessitura_rest 0.1.4 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e276627deb0d64cd07168970616233fc3cedf38
4
- data.tar.gz: d85b7b96028b0d878cc64eff4aaead0816e5662e
3
+ metadata.gz: b86d082b3709916579c931b5329ac2bcc84acbc0
4
+ data.tar.gz: 8bf244efe935ec5cb11e4d686f556c2aea256d5b
5
5
  SHA512:
6
- metadata.gz: 580f4823da0ce9f6f96766729710ea0f95dab3ed08e48ae78ff50ff2cdea82a8953ec9ad9a5d4119be587a16ef9bebac9265250568381bdd4fc84d3130ae1c7b
7
- data.tar.gz: 2dd974adab5948b20a097a4e2cc47427855dd099c789381571c69e59f519c1496535d70b9440b4c65cd08765a5aa4f42f261cdcf4699a377c66b8111a21285f2
6
+ metadata.gz: da28bd3277036d09432bff028736240129d0ef4b76dd00bdf2ea7feae9b5cd30bad9ba18f20a4ea44aeffdf97f831dae06d10183b8af4d06146425e4e536ecc1
7
+ data.tar.gz: c3e594822c723e6329e028ad21787f7ccf4f092d5f8cecd1d2c12eec9e5286e088374bc7a653c8c23832ecf728e197144d7312e476cba2310933df21765d512a
@@ -1,3 +1,3 @@
1
1
  class TessituraRest
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -6,6 +6,34 @@ module Session
6
6
  JSON.parse(response.body)
7
7
  end
8
8
 
9
+ def create_session(ip, options={})
10
+ parameters =
11
+ {
12
+ 'IpAddress': ip
13
+ }
14
+ options.merge!({:basic_auth => @auth})
15
+ options.merge!(:body => parameters)
16
+ response = self.class.post(base_api_endpoint('Web/Session'), options)
17
+ JSON.parse(response.body)
18
+ end
19
+
20
+ def get_expiration(key, options={})
21
+ options.merge!({:basic_auth => @auth})
22
+ response = self.class.get(base_api_endpoint("Web/Session/#{key}/Expiration"), options)
23
+ JSON.parse(response.body)
24
+ end
25
+
26
+ def set_expiration(key, expiration, options={})
27
+ parameters =
28
+ {
29
+ 'Expiration': expiration
30
+ }
31
+ options.merge!({:basic_auth => @auth})
32
+ options.merge!(:body => parameters)
33
+ response = self.class.put(base_api_endpoint("Web/Session/#{key}/Expiration"), options)
34
+ JSON.parse(response.body)
35
+ end
36
+
9
37
  def get_promotion(key, code, options={})
10
38
  parameters =
11
39
  {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tessitura_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brittany Martin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-03 00:00:00.000000000 Z
11
+ date: 2018-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler