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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c778b9b350564bee0817d932bcb14fbd8628d60
4
- data.tar.gz: beb9cda86e76ecd0199b79c049cbace59955a97a
3
+ metadata.gz: b5b12f80f4beef0e352d3dee0700d66d74d987f3
4
+ data.tar.gz: d1eb6db43955497cc3364fb19a46fbad7a75dc98
5
5
  SHA512:
6
- metadata.gz: 31499be2141ea81808af86f5413b38639fae44248f1675ee40e202def9bb5f9f0f8345eb0338e0bc9609a1d850adae1fa74f6a2f40a1fd6f4924466e1013566c
7
- data.tar.gz: 398b0a6843bdcdd8c5ef837ddfbf94b4608b611fc364d161ac97347a6e939a35660b7f0df9222dcc130bb872fa8a0b25df7d21a192280ae217e3e7f1a4ff9dd6
6
+ metadata.gz: bb77238434b1b9abf227ac2b5748f05318e02100caf14997f63d0e6acb5bc67a57923c332d712a90c872dbd847324a600b9bacd0dbeab0506180bcdf46d86db6
7
+ data.tar.gz: 8454c62ce3ace6bd3ed74ef9aae28d0a8b2da6be4dde494291e6086c0e08f751a1567e7ed6ad5fcb0e963222569421ce3933d82c540d280227c4f0b3aa1fbc0b
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 = '10.4.1'.freeze
8
+ VERSION = '10.5.0'.freeze
9
9
  end
10
10
  end
11
11
  end
@@ -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
@@ -15,6 +15,7 @@ module Wes
15
15
  creator_users: 'creator-users',
16
16
  rewards: 'rewards',
17
17
  reward: 'reward',
18
+ showcase: 'showcase',
18
19
  submission: 'submission',
19
20
  submissions: 'submissions',
20
21
  video: 'video',
@@ -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.1
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-08-16 00:00:00.000000000 Z
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