wes-data-api 4.1.0 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wes/data/api.rb +1 -1
- data/lib/wes/data/api/model/submission.rb +9 -15
- data/lib/wes/data/api/model/video.rb +14 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5be436c59614328b3b57c18dfe57aa903d6f5a37
|
4
|
+
data.tar.gz: 1bd0512febe063221cc1a6bb3e01f49a302a0681
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da7d5cd95360e172d0ee86830ade337946c2220dc99e0105a17ff9bbe89876d99345c34f0f19fbb18991639d0adcfa82bb65162a3a738b21b6fc944859b74402
|
7
|
+
data.tar.gz: 7d6b7730ba38868ada080dfc56bfb3e22a02d4ec82eed63ee47a2d5c55a5f79f7369669a6eb950d0e3864a3e28dd219ef1814dd4b43ee1bd8d9ca9ea76d42cb2
|
data/lib/wes/data/api.rb
CHANGED
@@ -7,20 +7,11 @@ module Wes
|
|
7
7
|
module Model
|
8
8
|
class Submission < Base
|
9
9
|
def approve
|
10
|
-
update(
|
10
|
+
update(:state => "approved")
|
11
11
|
end
|
12
12
|
|
13
13
|
def decline
|
14
|
-
update(
|
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
|
36
|
-
|
37
|
-
|
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
|