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 +4 -4
- data/lib/wes/data/api.rb +1 -1
- data/lib/wes/data/api/model/brand.rb +13 -0
- data/lib/wes/data/api/model/brand_partner_account.rb +12 -0
- data/lib/wes/data/api/model/brief.rb +13 -0
- data/lib/wes/data/api/model/video_partner_asset.rb +12 -0
- data/lib/wes/data/api/routes.rb +3 -0
- data/lib/wes/data/api/video.rb +7 -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: 4557d409e34c14b19c201ccab18b97698ec330cb
|
4
|
+
data.tar.gz: 14639d9b81366e18b422415b391f13e281fbb72f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86c9a98983a20977bbf0a71bdbc579e98f8aca8af2c0b591fdb9ccfc16384002e664673b93e6af96e3a02c51838017dee458474588a57f64f4c5122f1ca94936
|
7
|
+
data.tar.gz: 197e4a53a06556325465ee6668afdfff55d59e12c28e63777f161fd20947f4368e8116321d86ed9bbb9ac0fd82c2d6e98be515d77d50d05d5c90fac44782d14c
|
data/lib/wes/data/api.rb
CHANGED
@@ -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
|
@@ -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
|
data/lib/wes/data/api/routes.rb
CHANGED
@@ -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',
|
data/lib/wes/data/api/video.rb
CHANGED
@@ -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:
|
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-
|
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
|