wes-data-api 4.1.0 → 4.2.0

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: f81a17e6bfc29c156b1a4cee8df7b17284aa0eef
4
- data.tar.gz: 751f4000eb98fda0aa4788f0a9ff244e5cace307
3
+ metadata.gz: 5be436c59614328b3b57c18dfe57aa903d6f5a37
4
+ data.tar.gz: 1bd0512febe063221cc1a6bb3e01f49a302a0681
5
5
  SHA512:
6
- metadata.gz: 36010cf1522f98e89d6e08d5edc85a840d0eb5c6f3ac82b118a8202b4b40c827e68a70d4e30a3fa87d0f43c7bad5d920c3bc6ab39cf1d19b273b4f6742d84364
7
- data.tar.gz: caa6c09d43f708fef152e54964d0ff3da3aa83914f8f3db5806d31f39447c4d92c4eec4ee5a68d2b6ae36930984bd421185feef0602a3bc6d511d1be9915d6ae
6
+ metadata.gz: da7d5cd95360e172d0ee86830ade337946c2220dc99e0105a17ff9bbe89876d99345c34f0f19fbb18991639d0adcfa82bb65162a3a738b21b6fc944859b74402
7
+ data.tar.gz: 7d6b7730ba38868ada080dfc56bfb3e22a02d4ec82eed63ee47a2d5c55a5f79f7369669a6eb950d0e3864a3e28dd219ef1814dd4b43ee1bd8d9ca9ea76d42cb2
data/lib/wes/data/api.rb CHANGED
@@ -5,7 +5,7 @@ require "wes/data/api/configuration"
5
5
  module Wes
6
6
  module Data
7
7
  module API
8
- VERSION = "4.1.0".freeze
8
+ VERSION = "4.2.0".freeze
9
9
  end
10
10
  end
11
11
  end
@@ -7,20 +7,11 @@ module Wes
7
7
  module Model
8
8
  class Submission < Base
9
9
  def approve
10
- update(state_hash("approved"))
10
+ update(:state => "approved")
11
11
  end
12
12
 
13
13
  def decline
14
- update(state_hash("declined"))
15
- end
16
-
17
- def update(changes)
18
- route = [routes.submission, id].join("/")
19
- attributes = client.put(
20
- route, attributes.to_h.merge(changes)
21
- ).first
22
-
23
- self
14
+ update(:state => "declined")
24
15
  end
25
16
 
26
17
  def videos
@@ -32,10 +23,13 @@ module Wes
32
23
 
33
24
  private
34
25
 
35
- def state_hash(s)
36
- {
37
- :state => s
38
- }
26
+ def update(changes)
27
+ route = [routes.submission, id].join("/")
28
+ attributes = client.put(
29
+ route, attributes.to_h.merge(changes)
30
+ ).first
31
+
32
+ self
39
33
  end
40
34
  end
41
35
  end
@@ -5,6 +5,20 @@ module Wes
5
5
  module API
6
6
  module Model
7
7
  class Video < Base
8
+ def caption(edit)
9
+ update(:caption => edit)
10
+ end
11
+
12
+ private
13
+
14
+ def update(changes)
15
+ route = [routes.billing, id].join("/")
16
+ attributes = client.put(
17
+ route, attributes.to_h.merge(changes)
18
+ ).first
19
+
20
+ self
21
+ end
8
22
  end
9
23
  end
10
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wes-data-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''