wes-data-api 8.0.0 → 8.1.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: 660f47ee41899d5d40397085d45ee91aa0c15cd7
4
- data.tar.gz: a161311b99cb52e90ded36d58e14d77fb75aa3cb
3
+ metadata.gz: 8f3c87c91ba5ba37afe1d9888b06a6eb627054f3
4
+ data.tar.gz: 8a1917e11316cf96427e761fdf83f517bf6aae80
5
5
  SHA512:
6
- metadata.gz: c496a5575ae262b0161c3997d22b4e7c97482ff725a5e9415d2f1b1ad9e3a50709c8eef657fb3bdb314c321930f215155a77d1b220dfafbba323ef007ce0f464
7
- data.tar.gz: 5775d781127630c51c110171471b88b71e985b790ac62f46c9b0d0811c0a2d0c2a99d0b79cf4179e2df9bc7c851af4c821dbc6dbfb7ddd0c25efd763ec6aa0cf
6
+ metadata.gz: 3fedf8df17d4e19a1bfdd22fbec21b0f24f3064afd1fe81a1fa6c97674f9980b58ced2b344f19309e142c26274f10f5be994dad9e0523999fb67b0c4bec644e9
7
+ data.tar.gz: 3a3e8f57102211c4a46fe18d0b5da01c558220277991f7964a9138bb83003b9cc3b63d7393250c683ad626212e80c2524f745ef0033fec2ffae77e13da5109b9
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 = "8.0.0".freeze
8
+ VERSION = "8.1.0".freeze
9
9
  end
10
10
  end
11
11
  end
@@ -1,6 +1,7 @@
1
1
  require "wes/data/api/model/base"
2
2
  require "wes/data/api/model/creator_user"
3
3
  require "wes/data/api/video_transcoding_state"
4
+ require "wes/data/api/model/submission"
4
5
 
5
6
  module Wes
6
7
  module Data
@@ -31,12 +32,24 @@ module Wes
31
32
  self
32
33
  end
33
34
 
35
+ def submission(fetch: false)
36
+ record = fetch ? fetch_submission : @attributes.submission
37
+ Wes::Data::API::Model::Submission.new(record)
38
+ end
39
+
34
40
  def transcoding_state(type)
35
41
  Wes::Data::API::VideoTranscodingState.find(
36
42
  id,
37
43
  type
38
44
  )
39
45
  end
46
+
47
+ private
48
+
49
+ def fetch_submission
50
+ route = [routes.submission, id].join("/")
51
+ client.get(route).first
52
+ end
40
53
  end
41
54
  end
42
55
  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: 8.0.0
4
+ version: 8.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-20 00:00:00.000000000 Z
11
+ date: 2016-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler