wes-data-api 10.9.0 → 10.10.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: fd0e46c320b1302fc4aefb73bce7cfb1a280540f
4
- data.tar.gz: e7047e1bc49bdc87b4ce1d954e31ba0e89cc81ad
3
+ metadata.gz: f026700200ea01f3fa9d290fcb26a4c1ffbbce5d
4
+ data.tar.gz: f57721271fb9af17eab51733be1f0b08330dfe08
5
5
  SHA512:
6
- metadata.gz: 45062d807b19f1f90c24671eeb793f828bdd41bfe476de71c471fc7ee4e7c218e206f5012d2833a89ddc1ab4648b1f0ec3cdc554e7679d6530561c652e6aeeb1
7
- data.tar.gz: 48688675a4935e2cf6d7d0fada8fc8761f737f2303bc015771a81028f962035dfe79b60ba329a6e05e62ce5753d21362a874b13b861d671c3dcad79c3d9b3336
6
+ metadata.gz: bd6aca904dacc68cf70d1b9c422e55c607daf6333b948cbaafee141f3df48acd70aa91237d7def6fff3b730a3754cb6b82a20ea8131e9a3a6d9ad377565a6286
7
+ data.tar.gz: fb5f91219d00e2b5c084ab97dc773fc4910de130c5620de608320945f72cc76e2e3e54a1c50bf88dd0287ec5f19ead63419aa7eb5c9d214c8bae146239dc941b
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.9.0'.freeze
8
+ VERSION = '10.10.0'.freeze
9
9
  end
10
10
  end
11
11
  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 Tag < Base
8
+ end
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,24 @@
1
+ require 'wes/data/api/model/base'
2
+ require 'wes/data/api/model/tag'
3
+
4
+ module Wes
5
+ module Data
6
+ module API
7
+ module Model
8
+ class TagVideoVersion < Base
9
+ def tag
10
+ Wes::Data::API::Model::Tag.new(@attributes.tag.first)
11
+ end
12
+
13
+ def clarifai_metadata
14
+ return nil unless @attributes.clarifai_metadata
15
+ JSON.parse(
16
+ @attributes.clarifai_metadata,
17
+ symbolize_names: true
18
+ )
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -3,6 +3,7 @@ require 'wes/data/api/model/creator_user'
3
3
  require 'wes/data/api/video_transcoding_state'
4
4
  require 'wes/data/api/model/submission'
5
5
  require 'wes/data/api/model/video_version'
6
+ require 'wes/data/api/model/tag_video_version'
6
7
  require 'wes/data/api/submission'
7
8
 
8
9
  module Wes
@@ -64,8 +65,20 @@ module Wes
64
65
  end
65
66
  end
66
67
 
68
+ def tags
69
+ map_objects(
70
+ fetch_tags,
71
+ Wes::Data::API::Model::TagVideoVersion
72
+ )
73
+ end
74
+
67
75
  private
68
76
 
77
+ def fetch_tags
78
+ route = [routes.video, id, routes.tags].join('/')
79
+ client.get(route)
80
+ end
81
+
69
82
  def fetch_current_version
70
83
  Wes::Data::API::VideoVersion.current(id)
71
84
  end
@@ -21,6 +21,7 @@ module Wes
21
21
  submissions: 'submissions',
22
22
  video: 'video',
23
23
  videos: 'videos',
24
+ tags: 'tags',
24
25
  transcoding_state: 'transcoding-state',
25
26
  version: 'version',
26
27
  questions: 'questions',
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.9.0
4
+ version: 10.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-29 00:00:00.000000000 Z
11
+ date: 2016-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -138,6 +138,8 @@ files:
138
138
  - lib/wes/data/api/model/reward.rb
139
139
  - lib/wes/data/api/model/showcase.rb
140
140
  - lib/wes/data/api/model/submission.rb
141
+ - lib/wes/data/api/model/tag.rb
142
+ - lib/wes/data/api/model/tag_video_version.rb
141
143
  - lib/wes/data/api/model/video.rb
142
144
  - lib/wes/data/api/model/video_transcoding_state.rb
143
145
  - lib/wes/data/api/model/video_version.rb