vidsy-data-api 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vidsy/data/api/challenge.rb +9 -0
- data/lib/vidsy/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: 5fd9229f48def67b5decc3761b0511bf3cb9a843
|
4
|
+
data.tar.gz: 77b11aca7487750ca755475cf877657472233ac8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67281a2c3ff694145d1e4b575dfd15cf020100c35fe49d5a4f88b234281fe2809d32e9f27986d247a9d6ba679914b11fd1183d69b4166b8b27a8c8f13f81c0d1
|
7
|
+
data.tar.gz: b0d9938aebd58638241dad25955d0c887c6967329e64850cc9e8366a25f33cd46019c63b7165cd84664dc8e16a5b67737640caa0e011709dbb851b048883f6b4
|
@@ -5,6 +5,10 @@ module Vidsy
|
|
5
5
|
module Data
|
6
6
|
module API
|
7
7
|
class Challenge
|
8
|
+
def initialize(id = nil)
|
9
|
+
@id = id
|
10
|
+
end
|
11
|
+
|
8
12
|
def self.find(id)
|
9
13
|
new.find id
|
10
14
|
end
|
@@ -13,6 +17,11 @@ module Vidsy
|
|
13
17
|
client.get("#{routes.challenge}/#{id}").first
|
14
18
|
end
|
15
19
|
|
20
|
+
def videos
|
21
|
+
raise(ArgumentError, "ID not set for Challenge") if id.nil?
|
22
|
+
client.get "#{routes.challenge}/#{id}#{routes.videos}"
|
23
|
+
end
|
24
|
+
|
16
25
|
private
|
17
26
|
|
18
27
|
attr_reader :id
|