wes-data-api 10.4.1 → 10.5.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/showcase.rb +31 -0
- data/lib/wes/data/api/routes.rb +1 -0
- data/lib/wes/data/api/showcase.rb +25 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5b12f80f4beef0e352d3dee0700d66d74d987f3
|
4
|
+
data.tar.gz: d1eb6db43955497cc3364fb19a46fbad7a75dc98
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb77238434b1b9abf227ac2b5748f05318e02100caf14997f63d0e6acb5bc67a57923c332d712a90c872dbd847324a600b9bacd0dbeab0506180bcdf46d86db6
|
7
|
+
data.tar.gz: 8454c62ce3ace6bd3ed74ef9aae28d0a8b2da6be4dde494291e6086c0e08f751a1567e7ed6ad5fcb0e963222569421ce3933d82c540d280227c4f0b3aa1fbc0b
|
data/lib/wes/data/api.rb
CHANGED
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'wes/data/api/model/base'
|
2
|
+
|
3
|
+
module Wes
|
4
|
+
module Data
|
5
|
+
module API
|
6
|
+
module Model
|
7
|
+
class Showcase < Base
|
8
|
+
def add_videos(video_ids)
|
9
|
+
payload = video_ids.map do |video_id|
|
10
|
+
{
|
11
|
+
showcase_id: id,
|
12
|
+
video_id: video_id
|
13
|
+
}
|
14
|
+
end
|
15
|
+
client.post(add_video_route, payload)
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def add_video_route
|
21
|
+
[
|
22
|
+
routes.showcase,
|
23
|
+
short_hash,
|
24
|
+
'videos'
|
25
|
+
].join('/')
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/wes/data/api/routes.rb
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'wes/data/api/base'
|
2
|
+
require 'wes/data/api/model/showcase'
|
3
|
+
|
4
|
+
module Wes
|
5
|
+
module Data
|
6
|
+
module API
|
7
|
+
class Showcase
|
8
|
+
class << self
|
9
|
+
include Base
|
10
|
+
|
11
|
+
def create(data)
|
12
|
+
attributes = client.post(routes.showcase, data).first
|
13
|
+
attributes.nil? ? nil : model_klass.new(attributes)
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def model_klass
|
19
|
+
Wes::Data::API::Model::Showcase
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wes-data-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.
|
4
|
+
version: 10.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -136,6 +136,7 @@ files:
|
|
136
136
|
- lib/wes/data/api/model/collective.rb
|
137
137
|
- lib/wes/data/api/model/creator_user.rb
|
138
138
|
- lib/wes/data/api/model/reward.rb
|
139
|
+
- lib/wes/data/api/model/showcase.rb
|
139
140
|
- lib/wes/data/api/model/submission.rb
|
140
141
|
- lib/wes/data/api/model/video.rb
|
141
142
|
- lib/wes/data/api/model/video_transcoding_state.rb
|
@@ -144,6 +145,7 @@ files:
|
|
144
145
|
- lib/wes/data/api/response.rb
|
145
146
|
- lib/wes/data/api/reward.rb
|
146
147
|
- lib/wes/data/api/routes.rb
|
148
|
+
- lib/wes/data/api/showcase.rb
|
147
149
|
- lib/wes/data/api/submission.rb
|
148
150
|
- lib/wes/data/api/video.rb
|
149
151
|
- lib/wes/data/api/video_transcoding_state.rb
|