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 +4 -4
- data/lib/vidsy/data/api/user.rb +11 -0
- data/lib/vidsy/data/api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 308499b1e92f4fc88e037c9062d9c95e022393df
|
4
|
+
data.tar.gz: 3df3351edc5d5da1a093cded03e514b8123f726a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6020bf16047b4cc003a66899f5d1b48b0112a523a07c58218dd6fb274ea4f03ee45ce55a79dfe1a35f4026f67ef93f457503cb62d37bc887a49002bf85cce48
|
7
|
+
data.tar.gz: 6c5d77c5dcc4008a1908b4a818082013e65934a45430e59816b967bb8bce3afd62c66db59d2278f225b07c4b3c62af44e6010c7a21380f20c5f911cb634033f7
|
data/lib/vidsy/data/api/user.rb
CHANGED
@@ -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
|
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.
|
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-
|
11
|
+
date: 2016-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|