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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8cbbc4a384a084bc854cda652d3958322701d970
4
- data.tar.gz: 9aab6bdd68d67a8ed39d3ce2dce5acc19cc20290
3
+ metadata.gz: 5fd9229f48def67b5decc3761b0511bf3cb9a843
4
+ data.tar.gz: 77b11aca7487750ca755475cf877657472233ac8
5
5
  SHA512:
6
- metadata.gz: af3dceeb0a4a308231b5b4023df030be0591b033474012563cf81e349f341b102ab6554613d7e25714532ecc00cf8e9da96b73f2525068a8a23ae3aa822983bc
7
- data.tar.gz: c0f708e8652cb445c680b2d19cacfcfcecb71fc356346b00f5d832db8d3c3b3e61a2903aec791e0a7e4d44e332733a8be9e73a87e178e1859e1adb7d0cb1f049
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
@@ -1,7 +1,7 @@
1
1
  module Vidsy
2
2
  module Data
3
3
  module API
4
- VERSION = "0.6.0"
4
+ VERSION = "0.7.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vidsy-data-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charlie Revett