wcc-media-client 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wcc/media/active_record_shim.rb +2 -2
- data/lib/wcc/media/client.rb +7 -4
- data/lib/wcc/media/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: 62b489a071fa2cb5ad5e5afdf4a970364fb96bae
|
4
|
+
data.tar.gz: ea19048322dfc1206a5723ee16849b28d47a1d22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d18ced6d413da9a64493510cc6c5147074361e771c7d1586b2d52dbf5743e59e0418cafc8055006f264a2461503cd563718eda7ff3aed6ba384035ca1db3733
|
7
|
+
data.tar.gz: 4438d9438816c76aba2870764a1223909fe3855a52669b8095f792c88325ee6089c34985d155a01862e314d14549f5f6bd76c75805784b89c59429495b3d4749
|
@@ -28,8 +28,8 @@ module WCC::Media::ActiveRecordShim
|
|
28
28
|
self
|
29
29
|
end
|
30
30
|
|
31
|
-
def find(id)
|
32
|
-
WCC::Media::Client.default.public_send(endpoint).find(id)
|
31
|
+
def find(id, **params)
|
32
|
+
WCC::Media::Client.default.public_send(endpoint).find(id, **params)
|
33
33
|
end
|
34
34
|
|
35
35
|
def find_all(**filters)
|
data/lib/wcc/media/client.rb
CHANGED
@@ -55,8 +55,11 @@ module WCC
|
|
55
55
|
|
56
56
|
Resource =
|
57
57
|
Struct.new(:client, :model, :options) do
|
58
|
-
def find(id)
|
59
|
-
resp = client.get(
|
58
|
+
def find(id, **params)
|
59
|
+
resp = client.get(
|
60
|
+
"#{model.endpoint}/#{id}",
|
61
|
+
default_params('target').merge(params)
|
62
|
+
)
|
60
63
|
resp.assert_ok!
|
61
64
|
model.new(resp.body[model.key], resp.headers.freeze)
|
62
65
|
end
|
@@ -78,10 +81,10 @@ module WCC
|
|
78
81
|
end
|
79
82
|
end
|
80
83
|
|
81
|
-
def default_params
|
84
|
+
def default_params(keys = CONFIGURABLE_PARAMS)
|
82
85
|
options.each_with_object({}) do |(k, v), h|
|
83
86
|
k = k.to_s
|
84
|
-
h[k] = v if !v.nil? &&
|
87
|
+
h[k] = v if !v.nil? && keys.include?(k)
|
85
88
|
end
|
86
89
|
end
|
87
90
|
|
data/lib/wcc/media/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wcc-media-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Watermark Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: wcc-api
|