vidsy-data-api 0.10.1 → 0.11.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: f3b05a6342f7696486f9401bc6aa37261fd5920e
4
- data.tar.gz: 29a85468da3c3d252f55e7566695984c01db506f
3
+ metadata.gz: 308499b1e92f4fc88e037c9062d9c95e022393df
4
+ data.tar.gz: 3df3351edc5d5da1a093cded03e514b8123f726a
5
5
  SHA512:
6
- metadata.gz: 10d9e2a2fee8eaa3fa98355c6c24442eda1db00cea3b5cab19ceb09ed69c98af2f54e524c43a19d2b8d2c6a2ff3d1075432dd4f4e53867dc41bccd9c36a5a6f6
7
- data.tar.gz: 6de955a47eed6eed284efe97c722b15a8241eb955c22e3d5b28bbd480d8a6d35f55701a26b8565f3568d204e1ff0a9d8667de70f44357137f0d8b23a9dd828c3
6
+ metadata.gz: e6020bf16047b4cc003a66899f5d1b48b0112a523a07c58218dd6fb274ea4f03ee45ce55a79dfe1a35f4026f67ef93f457503cb62d37bc887a49002bf85cce48
7
+ data.tar.gz: 6c5d77c5dcc4008a1908b4a818082013e65934a45430e59816b967bb8bce3afd62c66db59d2278f225b07c4b3c62af44e6010c7a21380f20c5f911cb634033f7
@@ -5,6 +5,10 @@ module Vidsy
5
5
  module Data
6
6
  module API
7
7
  class User
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
@@ -29,8 +33,15 @@ module Vidsy
29
33
  client.get("#{routes.user}?email=#{email}").first
30
34
  end
31
35
 
36
+ def videos
37
+ raise(ArgumentError, "ID not set for Video") if id.nil?
38
+ client.get "#{routes.user}/#{id}#{routes.videos}"
39
+ end
40
+
32
41
  private
33
42
 
43
+ attr_reader :id
44
+
34
45
  def client
35
46
  Vidsy::Data::API::Client.new
36
47
  end
@@ -1,7 +1,7 @@
1
1
  module Vidsy
2
2
  module Data
3
3
  module API
4
- VERSION = "0.10.1"
4
+ VERSION = "0.11.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vidsy-data-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charlie Revett
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-17 00:00:00.000000000 Z
11
+ date: 2016-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler