wes-data-api 1.0.0 → 1.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: 2f091fd968c4b703a2cb83a16b042aa458bbcdad
4
- data.tar.gz: 057216bd58c98af84f3e138475c74e86932d2eae
3
+ metadata.gz: 8c9e15deb31189a38346f8371f283a32f4ed3af6
4
+ data.tar.gz: a9dbfa9ab441d14138ec660c5bc4c128dd64a994
5
5
  SHA512:
6
- metadata.gz: 5ce405d9d311d542fae229a155d2df987ca33e49d0894a587dccb7ce3bfc6deeae5be50ea4f5d97f379bc452e16522df45f9a2888e1bfe7098947072813c8372
7
- data.tar.gz: 05b08f4426711d175d72dff2759eb7a16f4da7d998746c6f3f0ebaa8676c38ab409a81df088002c46b58cd9d7fa9030ed073c9518fde19465a2ef81caa069722
6
+ metadata.gz: fc67a52560aae31d446237384da05bf547ebea5b61cb68fe85483fd99accab7c3591aa0ce54dca92762bc2739a46bb7423c3fa4a96fdc68292626da39ea7108a
7
+ data.tar.gz: e2884ce53ab2b11aac1344a9688a25599b29413c90f53b763f4622276ef7aab1c9bb413a6e7d9e1689d3438575c3411efacc8f4687f647d21d65dde722dc6f0e
@@ -5,6 +5,10 @@ module Wes
5
5
  module Data
6
6
  module API
7
7
  class Submission
8
+ def initialize(id = nil)
9
+ @id = id
10
+ end
11
+
8
12
  def self.create(options)
9
13
  new.create options
10
14
  end
@@ -21,8 +25,15 @@ module Wes
21
25
  client.get("#{routes.submission}/#{id}").first
22
26
  end
23
27
 
28
+ def videos
29
+ raise(ArgumentError, "ID not set for Submission") if id.nil?
30
+ client.get "#{routes.submission}/#{id}#{routes.videos}"
31
+ end
32
+
24
33
  private
25
34
 
35
+ attr_reader :id
36
+
26
37
  def client
27
38
  Client.new
28
39
  end
@@ -1,7 +1,7 @@
1
1
  module Wes
2
2
  module Data
3
3
  module API
4
- VERSION = "1.0.0".freeze
4
+ VERSION = "1.1.0".freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wes-data-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''