wes-data-api 12.3.0 → 13.0.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: 5d9ef03f51d99db388de309bf4a087de117a64ff
4
- data.tar.gz: 2d82092389fb34b6dfb6517e18f1fd6c50d4804a
3
+ metadata.gz: 4557d409e34c14b19c201ccab18b97698ec330cb
4
+ data.tar.gz: 14639d9b81366e18b422415b391f13e281fbb72f
5
5
  SHA512:
6
- metadata.gz: d00242aed47d5e0d36f27a6fc41736d927544067a9e9be5a99f1dc11c7585c12aff473fe78a3b04cc56eca52ae8dae12592594e26454c76ab6ab2406f1675734
7
- data.tar.gz: b28a0007b77ee7895b81ff48f60dca8664ddc01fd30c6df95697773f19ee3a2960949bcc60d625e691ae7d44fa09d99bea9ce67fb4a293102e864ca1495e1310
6
+ metadata.gz: 86c9a98983a20977bbf0a71bdbc579e98f8aca8af2c0b591fdb9ccfc16384002e664673b93e6af96e3a02c51838017dee458474588a57f64f4c5122f1ca94936
7
+ data.tar.gz: 197e4a53a06556325465ee6668afdfff55d59e12c28e63777f161fd20947f4368e8116321d86ed9bbb9ac0fd82c2d6e98be515d77d50d05d5c90fac44782d14c
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 = '12.3.0'.freeze
8
+ VERSION = '13.0.0'.freeze
9
9
  end
10
10
  end
11
11
  end
@@ -1,5 +1,6 @@
1
1
  require 'wes/data/api/model/base'
2
2
  require 'wes/data/api/model/brief'
3
+ require 'wes/data/api/model/brand_partner_account'
3
4
 
4
5
  module Wes
5
6
  module Data
@@ -13,12 +14,24 @@ module Wes
13
14
  )
14
15
  end
15
16
 
17
+ def partner_accounts
18
+ records = fetch_partner_accounts
19
+ map_objects(
20
+ records, Wes::Data::API::Model::BrandPartnerAccount
21
+ )
22
+ end
23
+
16
24
  private
17
25
 
18
26
  def fetch_briefs
19
27
  route = [routes.brand, id, routes.briefs].join('/')
20
28
  client.get(route)
21
29
  end
30
+
31
+ def fetch_partner_accounts
32
+ route = [routes.brand, id, routes.partner_accounts].join('/')
33
+ client.get(route)
34
+ end
22
35
  end
23
36
  end
24
37
  end
@@ -0,0 +1,12 @@
1
+ require 'wes/data/api/model/base'
2
+
3
+ module Wes
4
+ module Data
5
+ module API
6
+ module Model
7
+ class BrandPartnerAccount < Base
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -4,6 +4,7 @@ require 'wes/data/api/model/creator_user'
4
4
  require 'wes/data/api/model/video'
5
5
  require 'wes/data/api/model/brief_answer'
6
6
  require 'wes/data/api/model/transaction'
7
+ require 'wes/data/api/model/video_partner_asset'
7
8
 
8
9
  module Wes
9
10
  module Data
@@ -81,6 +82,13 @@ module Wes
81
82
  )
82
83
  end
83
84
 
85
+ def video_partner_assets
86
+ records = fetch_video_partner_assets
87
+ map_objects(
88
+ records, Wes::Data::API::Model::VideoPartnerAsset
89
+ )
90
+ end
91
+
84
92
  private
85
93
 
86
94
  def answers_route
@@ -113,6 +121,11 @@ module Wes
113
121
  raise NoMethodError unless @attributes.respond_to?(method_name)
114
122
  @attributes.send(method_name)
115
123
  end
124
+
125
+ def video_partner_assets
126
+ route = [routes.brief, id, routes.videos, routes.partner_assets].join('/')
127
+ client.get(route)
128
+ end
116
129
  end
117
130
  end
118
131
  end
@@ -0,0 +1,12 @@
1
+ require 'wes/data/api/model/base'
2
+
3
+ module Wes
4
+ module Data
5
+ module API
6
+ module Model
7
+ class VideoPartnerAsset < Base
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -16,6 +16,9 @@ module Wes
16
16
  creator_user: 'creator-user',
17
17
  creator_users: 'creator-users',
18
18
  feed: 'feed',
19
+ partner_accounts: 'partner-accounts',
20
+ partner_asset: 'partner-asset',
21
+ partner_assets: 'partner-assets',
19
22
  showcase: 'showcase',
20
23
  submission: 'submission',
21
24
  submissions: 'submissions',
@@ -1,5 +1,6 @@
1
1
  require 'wes/data/api/base'
2
2
  require 'wes/data/api/model/video'
3
+ require 'wes/data/api/model/video_partner_asset'
3
4
 
4
5
  module Wes
5
6
  module Data
@@ -13,6 +14,12 @@ module Wes
13
14
  attributes.nil? ? nil : model_klass.new(attributes)
14
15
  end
15
16
 
17
+ def create_partner_asset(options)
18
+ route = [routes.video, id, routes.partner_asset].join('/')
19
+ attributes = client.post(route, options).first
20
+ attributes.nil? ? nil : Wes::Data::API::Model::VideoPartnerAsset.new(attributes)
21
+ end
22
+
16
23
  def find(key, value)
17
24
  route = generate_route(key, value)
18
25
  attributes = client.get(route).first
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: 12.3.0
4
+ version: 13.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-26 00:00:00.000000000 Z
11
+ date: 2017-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -131,6 +131,7 @@ files:
131
131
  - lib/wes/data/api/model/address.rb
132
132
  - lib/wes/data/api/model/base.rb
133
133
  - lib/wes/data/api/model/brand.rb
134
+ - lib/wes/data/api/model/brand_partner_account.rb
134
135
  - lib/wes/data/api/model/brand_user.rb
135
136
  - lib/wes/data/api/model/brief.rb
136
137
  - lib/wes/data/api/model/brief_answer.rb
@@ -144,6 +145,7 @@ files:
144
145
  - lib/wes/data/api/model/tag_video_version.rb
145
146
  - lib/wes/data/api/model/transaction.rb
146
147
  - lib/wes/data/api/model/video.rb
148
+ - lib/wes/data/api/model/video_partner_asset.rb
147
149
  - lib/wes/data/api/model/video_transcoding_state.rb
148
150
  - lib/wes/data/api/model/video_version.rb
149
151
  - lib/wes/data/api/pagination.rb