wes-data-api 9.0.0 → 9.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.rb +1 -1
- data/lib/wes/data/api/video.rb +6 -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: 1ae14374aa6a02e9de6f5a3aaf26701649c6c920
|
4
|
+
data.tar.gz: efcf2b2b1445077bfff90fd373d8e285c909cf3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf6549a2cd72ff3d145bb1811ddcc75669831d8a366f83953623e34031b9ba491062776735845a4d275fed07ee2e55583baf63ace5f6d2926e300e6a4a36b399
|
7
|
+
data.tar.gz: acf5799cc105687945a024a99acc61fae7c9ef05e5099d37903202e46b1ea0ce0c255f179fccda836160acfc7127f8b0c8f421482938dafc482e4dc5b41e97a9
|
data/lib/wes/data/api.rb
CHANGED
data/lib/wes/data/api/video.rb
CHANGED
@@ -14,13 +14,18 @@ module Wes
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def find(key, value)
|
17
|
-
route =
|
17
|
+
route = generate_route(key, value)
|
18
18
|
attributes = client.get(route).first
|
19
19
|
attributes.nil? ? nil : model_klass.new(attributes)
|
20
20
|
end
|
21
21
|
|
22
22
|
private
|
23
23
|
|
24
|
+
def generate_route(key, value)
|
25
|
+
route = key == :id ? "%s/#{value}" : "%s?#{key}=#{value}"
|
26
|
+
format(route, routes.video)
|
27
|
+
end
|
28
|
+
|
24
29
|
def model_klass
|
25
30
|
Wes::Data::API::Model::Video
|
26
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wes-data-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|