frederick_api 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/frederick_api/v2/helpers/query_builder.rb +16 -0
- data/lib/frederick_api/v2/resource.rb +10 -2
- data/lib/frederick_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: 7636c80bff651fc5077fd459d15e4eed3cfa0153
|
4
|
+
data.tar.gz: cc6942cbf2c1b1b050ef78bebbd848b8ac134c55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 556a269898c09934171dbf357358d2b95204611ee74db8c26daaabd9e9e0fbcfb70cf248f7feb58e07ea0ce03dd6a41929d036a999a969e376ede0351bac1a87
|
7
|
+
data.tar.gz: c3d145b66c28fcfde512017098fab5cd84d2c2f936b7e4a1bcbd252803cf4b55b34bd7f5e5311d21b5a1c2137441f482f29e8bfe83765abd6b049b9053ecd020
|
@@ -16,6 +16,22 @@ module FrederickAPI
|
|
16
16
|
.merge(additional_params)
|
17
17
|
end
|
18
18
|
|
19
|
+
def filter_params
|
20
|
+
super_filter_params = super
|
21
|
+
|
22
|
+
if (filters = super_filter_params[:filter])
|
23
|
+
filters.each do |filter_name, filter_val|
|
24
|
+
filters[filter_name] = filter_val.join(',') if filter_val.is_a?(Array)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
super_filter_params
|
29
|
+
end
|
30
|
+
|
31
|
+
def all_records
|
32
|
+
self.all.pages.all_records
|
33
|
+
end
|
34
|
+
|
19
35
|
def to_dot_params(object, prefix = nil)
|
20
36
|
return {} if object == {}
|
21
37
|
|
@@ -16,8 +16,16 @@ module FrederickAPI
|
|
16
16
|
super
|
17
17
|
end
|
18
18
|
|
19
|
+
def self.all_records
|
20
|
+
self.all.pages.all_records
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.top_level_namespace
|
24
|
+
self.to_s.split('::').first.constantize
|
25
|
+
end
|
26
|
+
|
19
27
|
def self.site
|
20
|
-
"#{
|
28
|
+
"#{top_level_namespace.config.base_url}/v2/"
|
21
29
|
end
|
22
30
|
|
23
31
|
def self.with_access_token(token)
|
@@ -27,7 +35,7 @@ module FrederickAPI
|
|
27
35
|
end
|
28
36
|
|
29
37
|
def self.custom_headers
|
30
|
-
super.merge(x_api_key:
|
38
|
+
super.merge(x_api_key: top_level_namespace.config.api_key)
|
31
39
|
end
|
32
40
|
end
|
33
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: frederick_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frederick Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json_api_client
|