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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: de5ad3766b808f03e5c9b09412fb919db6b4e8aa
4
- data.tar.gz: 2d8de2f18b25de0994efc30934939770b7cb49c3
3
+ metadata.gz: 1ae14374aa6a02e9de6f5a3aaf26701649c6c920
4
+ data.tar.gz: efcf2b2b1445077bfff90fd373d8e285c909cf3a
5
5
  SHA512:
6
- metadata.gz: 79c77cbe0becf15e2ffb232e1ccacf82af2c64ea56c711403b93f1e06cc44f2171ebdc1188355ed18b3ff1aa81ea2a17f401fc47ca3c0d0eb2f578b2345e8019
7
- data.tar.gz: 050640bb1d5b1b6f7a703a36c90cc968b34a703f0056261aafd4c984e9c185a6710b423257481678af2ae3cc6591253c9efec7988abbc3019a6b6cdd7633e824
6
+ metadata.gz: cf6549a2cd72ff3d145bb1811ddcc75669831d8a366f83953623e34031b9ba491062776735845a4d275fed07ee2e55583baf63ace5f6d2926e300e6a4a36b399
7
+ data.tar.gz: acf5799cc105687945a024a99acc61fae7c9ef05e5099d37903202e46b1ea0ce0c255f179fccda836160acfc7127f8b0c8f421482938dafc482e4dc5b41e97a9
@@ -5,7 +5,7 @@ require "wes/data/api/configuration"
5
5
  module Wes
6
6
  module Data
7
7
  module API
8
- VERSION = "9.0.0".freeze
8
+ VERSION = "9.1.0".freeze
9
9
  end
10
10
  end
11
11
  end
@@ -14,13 +14,18 @@ module Wes
14
14
  end
15
15
 
16
16
  def find(key, value)
17
- route = "#{routes.video}?#{key}=#{value}"
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.0.0
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-24 00:00:00.000000000 Z
11
+ date: 2016-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler