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 +4 -4
- data/lib/wes/data/api/submission.rb +11 -0
- data/lib/wes/data/api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c9e15deb31189a38346f8371f283a32f4ed3af6
|
4
|
+
data.tar.gz: a9dbfa9ab441d14138ec660c5bc4c128dd64a994
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/wes/data/api/version.rb
CHANGED