visualization-js-api 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b220554223f9bfddf94f6bd5ea081e795d7d92bc2e9b7ccd512ae2c3f6e9bff
|
4
|
+
data.tar.gz: 8ad20bb2ce7c2a474758c9b23b2a2424916f12d91b589b7e167ad97b650396d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba88e8cbd9b6cc32b410fdff0996919d211f5e14c08556829e60063f853c196968455586d03f82038b4edbc30a3e8b0bcf8995fc44023566d8c7f3f1aca253e6
|
7
|
+
data.tar.gz: 7a6166b5eeabaab007799d689cbf1b789d62f3044bfe071a587aa754c18d476de60ced1aef2957127d1db733b7849c4649f57b55df180846b13051f5e8d933e0
|
@@ -31,7 +31,7 @@ module VisualizationJsApi
|
|
31
31
|
@api_client = api_client
|
32
32
|
end
|
33
33
|
|
34
|
-
#
|
34
|
+
#
|
35
35
|
# Renders a graph in PNG format
|
36
36
|
# @param graph_definition The graph definition object
|
37
37
|
# @param [Hash] opts the optional parameters
|
@@ -41,7 +41,7 @@ module VisualizationJsApi
|
|
41
41
|
return data
|
42
42
|
end
|
43
43
|
|
44
|
-
#
|
44
|
+
#
|
45
45
|
# Renders a graph in PNG format
|
46
46
|
# @param graph_definition The graph definition object
|
47
47
|
# @param [Hash] opts the optional parameters
|
@@ -74,13 +74,11 @@ module VisualizationJsApi
|
|
74
74
|
|
75
75
|
# http body (model)
|
76
76
|
post_body = @api_client.object_to_http_body(graph_definition)
|
77
|
-
auth_names = []
|
78
77
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
79
78
|
:header_params => header_params,
|
80
79
|
:query_params => query_params,
|
81
80
|
:form_params => form_params,
|
82
81
|
:body => post_body,
|
83
|
-
:auth_names => auth_names,
|
84
82
|
:return_type => 'String')
|
85
83
|
if @api_client.config.debugging
|
86
84
|
@api_client.config.logger.debug "API called: DefaultApi#render_png_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
@@ -88,7 +86,7 @@ module VisualizationJsApi
|
|
88
86
|
return data, status_code, headers
|
89
87
|
end
|
90
88
|
|
91
|
-
#
|
89
|
+
#
|
92
90
|
# Renders a graph in SVG format
|
93
91
|
# @param graph_definition The graph definition object
|
94
92
|
# @param [Hash] opts the optional parameters
|
@@ -98,7 +96,7 @@ module VisualizationJsApi
|
|
98
96
|
return data
|
99
97
|
end
|
100
98
|
|
101
|
-
#
|
99
|
+
#
|
102
100
|
# Renders a graph in SVG format
|
103
101
|
# @param graph_definition The graph definition object
|
104
102
|
# @param [Hash] opts the optional parameters
|
@@ -131,13 +129,11 @@ module VisualizationJsApi
|
|
131
129
|
|
132
130
|
# http body (model)
|
133
131
|
post_body = @api_client.object_to_http_body(graph_definition)
|
134
|
-
auth_names = []
|
135
132
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
136
133
|
:header_params => header_params,
|
137
134
|
:query_params => query_params,
|
138
135
|
:form_params => form_params,
|
139
136
|
:body => post_body,
|
140
|
-
:auth_names => auth_names,
|
141
137
|
:return_type => 'String')
|
142
138
|
if @api_client.config.debugging
|
143
139
|
@api_client.config.logger.debug "API called: DefaultApi#render_svg_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
@@ -58,6 +58,7 @@ module VisualizationJsApi
|
|
58
58
|
# @return [Array<(Object, Fixnum, Hash)>] an array of 3 elements:
|
59
59
|
# the data deserialized from response body (could be nil), response status code and response headers.
|
60
60
|
def call_api(http_method, path, opts = {})
|
61
|
+
opts = config.default_opts.merge(opts)
|
61
62
|
request = build_request(http_method, path, opts)
|
62
63
|
response = request.run
|
63
64
|
|
@@ -133,6 +133,8 @@ module VisualizationJsApi
|
|
133
133
|
|
134
134
|
attr_accessor :force_ending_format
|
135
135
|
|
136
|
+
attr_accessor :default_opts
|
137
|
+
|
136
138
|
def initialize
|
137
139
|
@scheme = 'https'
|
138
140
|
@host = 'localhost:8000'
|
@@ -149,6 +151,7 @@ module VisualizationJsApi
|
|
149
151
|
@inject_format = false
|
150
152
|
@force_ending_format = false
|
151
153
|
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
154
|
+
@default_opts = {}
|
152
155
|
|
153
156
|
yield(self) if block_given?
|
154
157
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: visualization-js-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Researchable
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -34,22 +34,22 @@ dependencies:
|
|
34
34
|
name: rspec
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - ">="
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: 3.4.0
|
40
37
|
- - "~>"
|
41
38
|
- !ruby/object:Gem::Version
|
42
39
|
version: '3.4'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 3.4.0
|
43
43
|
type: :development
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- - ">="
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: 3.4.0
|
50
47
|
- - "~>"
|
51
48
|
- !ruby/object:Gem::Version
|
52
49
|
version: '3.4'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 3.4.0
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: vcr
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -220,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
220
220
|
- !ruby/object:Gem::Version
|
221
221
|
version: '0'
|
222
222
|
requirements: []
|
223
|
-
rubygems_version: 3.
|
223
|
+
rubygems_version: 3.1.1
|
224
224
|
signing_key:
|
225
225
|
specification_version: 4
|
226
226
|
summary: This gem provides the interaction with the backend service for rendering
|
@@ -229,7 +229,7 @@ test_files:
|
|
229
229
|
- spec/api/default_api_spec.rb
|
230
230
|
- spec/api_client_spec.rb
|
231
231
|
- spec/configuration_spec.rb
|
232
|
-
- spec/models/graph_definition_spec.rb
|
233
232
|
- spec/models/graph_definition_graph_spec.rb
|
234
233
|
- spec/models/graph_definition_graph_options_spec.rb
|
234
|
+
- spec/models/graph_definition_spec.rb
|
235
235
|
- spec/spec_helper.rb
|