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 +4 -4
- data/lib/wes/data/api.rb +1 -1
- data/lib/wes/data/api/model/tag.rb +12 -0
- data/lib/wes/data/api/model/tag_video_version.rb +24 -0
- data/lib/wes/data/api/model/video.rb +13 -0
- data/lib/wes/data/api/routes.rb +1 -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: f026700200ea01f3fa9d290fcb26a4c1ffbbce5d
|
4
|
+
data.tar.gz: f57721271fb9af17eab51733be1f0b08330dfe08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd6aca904dacc68cf70d1b9c422e55c607daf6333b948cbaafee141f3df48acd70aa91237d7def6fff3b730a3754cb6b82a20ea8131e9a3a6d9ad377565a6286
|
7
|
+
data.tar.gz: fb5f91219d00e2b5c084ab97dc773fc4910de130c5620de608320945f72cc76e2e3e54a1c50bf88dd0287ec5f19ead63419aa7eb5c9d214c8bae146239dc941b
|
data/lib/wes/data/api.rb
CHANGED
@@ -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
|
data/lib/wes/data/api/routes.rb
CHANGED
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.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-
|
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
|