zabbix-api-simple 0.1.1 → 0.1.5

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.
@@ -0,0 +1,341 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Zabbix::Api::FaradayMiddleware::ZabbixApiRequest
8
+
9
+ &mdash; Documentation by YARD 0.9.26
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Zabbix::Api::FaradayMiddleware::ZabbixApiRequest";
19
+ relpath = '../../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../../_index.html">Index (Z)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../../Zabbix.html" title="Zabbix (module)">Zabbix</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Api.html" title="Zabbix::Api (module)">Api</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../FaradayMiddleware.html" title="Zabbix::Api::FaradayMiddleware (module)">FaradayMiddleware</a></span></span>
41
+ &raquo;
42
+ <span class="title">ZabbixApiRequest</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Zabbix::Api::FaradayMiddleware::ZabbixApiRequest
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Faraday::Middleware</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">Faraday::Middleware</li>
78
+
79
+ <li class="next">Zabbix::Api::FaradayMiddleware::ZabbixApiRequest</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/zabbix/api/client.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>this middleware adapter does zabbix api essential things at the REST level, and hendles serializing/de-serializing ruby objects.</p>
108
+
109
+
110
+ </div>
111
+ </div>
112
+ <div class="tags">
113
+
114
+
115
+ </div>
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+ <h2>
124
+ Instance Method Summary
125
+ <small><a href="#" class="summary_toggle">collapse</a></small>
126
+ </h2>
127
+
128
+ <ul class="summary">
129
+
130
+ <li class="public ">
131
+ <span class="summary_signature">
132
+
133
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(app) &#x21d2; ZabbixApiRequest </a>
134
+
135
+
136
+
137
+ </span>
138
+
139
+
140
+ <span class="note title constructor">constructor</span>
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+ <span class="summary_desc"><div class='inline'>
150
+ <p>A new instance of ZabbixApiRequest.</p>
151
+ </div></span>
152
+
153
+ </li>
154
+
155
+
156
+ <li class="public ">
157
+ <span class="summary_signature">
158
+
159
+ <a href="#on_complete-instance_method" title="#on_complete (instance method)">#<strong>on_complete</strong>(env) &#x21d2; Object </a>
160
+
161
+
162
+
163
+ </span>
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+ <span class="summary_desc"><div class='inline'></div></span>
174
+
175
+ </li>
176
+
177
+
178
+ <li class="public ">
179
+ <span class="summary_signature">
180
+
181
+ <a href="#on_request-instance_method" title="#on_request (instance method)">#<strong>on_request</strong>(env) &#x21d2; Object </a>
182
+
183
+
184
+
185
+ </span>
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+ <span class="summary_desc"><div class='inline'></div></span>
196
+
197
+ </li>
198
+
199
+
200
+ </ul>
201
+
202
+
203
+
204
+ <div id="constructor_details" class="method_details_list">
205
+ <h2>Constructor Details</h2>
206
+
207
+ <div class="method_details first">
208
+ <h3 class="signature first" id="initialize-instance_method">
209
+
210
+ #<strong>initialize</strong>(app) &#x21d2; <tt><span class='object_link'><a href="" title="Zabbix::Api::FaradayMiddleware::ZabbixApiRequest (class)">ZabbixApiRequest</a></span></tt>
211
+
212
+
213
+
214
+
215
+
216
+ </h3><div class="docstring">
217
+ <div class="discussion">
218
+
219
+ <p>Returns a new instance of ZabbixApiRequest.</p>
220
+
221
+
222
+ </div>
223
+ </div>
224
+ <div class="tags">
225
+
226
+
227
+ </div><table class="source_code">
228
+ <tr>
229
+ <td>
230
+ <pre class="lines">
231
+
232
+
233
+ 18
234
+ 19
235
+ 20
236
+ 21</pre>
237
+ </td>
238
+ <td>
239
+ <pre class="code"><span class="info file"># File 'lib/zabbix/api/client.rb', line 18</span>
240
+
241
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_app'>app</span><span class='rparen'>)</span>
242
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_app'>app</span><span class='rparen'>)</span>
243
+ <span class='ivar'>@app</span><span class='op'>=</span><span class='id identifier rubyid_app'>app</span>
244
+ <span class='kw'>end</span></pre>
245
+ </td>
246
+ </tr>
247
+ </table>
248
+ </div>
249
+
250
+ </div>
251
+
252
+
253
+ <div id="instance_method_details" class="method_details_list">
254
+ <h2>Instance Method Details</h2>
255
+
256
+
257
+ <div class="method_details first">
258
+ <h3 class="signature first" id="on_complete-instance_method">
259
+
260
+ #<strong>on_complete</strong>(env) &#x21d2; <tt>Object</tt>
261
+
262
+
263
+
264
+
265
+
266
+ </h3><table class="source_code">
267
+ <tr>
268
+ <td>
269
+ <pre class="lines">
270
+
271
+
272
+ 29
273
+ 30
274
+ 31
275
+ 32
276
+ 33
277
+ 34
278
+ 35</pre>
279
+ </td>
280
+ <td>
281
+ <pre class="code"><span class="info file"># File 'lib/zabbix/api/client.rb', line 29</span>
282
+
283
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_complete'>on_complete</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='rparen'>)</span>
284
+ <span class='kw'>begin</span>
285
+ <span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='symbol'>:response_body</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>JSON</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='symbol'>:response_body</span><span class='rbracket'>]</span><span class='rparen'>)</span>
286
+ <span class='kw'>rescue</span> <span class='const'>JSON</span><span class='op'>::</span><span class='const'>ParserError</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
287
+ <span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='symbol'>:response_body</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>error:</span> <span class='id identifier rubyid_e'>e</span><span class='comma'>,</span><span class='label'>note:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Check api web configuration (e.g. url, PHP memory, etc)</span><span class='tstring_end'>&#39;</span></span><span class='rbrace'>}</span>
288
+ <span class='kw'>end</span>
289
+ <span class='kw'>end</span></pre>
290
+ </td>
291
+ </tr>
292
+ </table>
293
+ </div>
294
+
295
+ <div class="method_details ">
296
+ <h3 class="signature " id="on_request-instance_method">
297
+
298
+ #<strong>on_request</strong>(env) &#x21d2; <tt>Object</tt>
299
+
300
+
301
+
302
+
303
+
304
+ </h3><table class="source_code">
305
+ <tr>
306
+ <td>
307
+ <pre class="lines">
308
+
309
+
310
+ 23
311
+ 24
312
+ 25
313
+ 26
314
+ 27</pre>
315
+ </td>
316
+ <td>
317
+ <pre class="code"><span class="info file"># File 'lib/zabbix/api/client.rb', line 23</span>
318
+
319
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_request'>on_request</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='rparen'>)</span>
320
+ <span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='symbol'>:request_body</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:jsonrpc</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>2.0</span><span class='tstring_end'>&quot;</span></span>
321
+ <span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='symbol'>:request_body</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>1</span><span class='tstring_end'>&quot;</span></span>
322
+ <span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='symbol'>:request_body</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='symbol'>:request_body</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
323
+ <span class='kw'>end</span></pre>
324
+ </td>
325
+ </tr>
326
+ </table>
327
+ </div>
328
+
329
+ </div>
330
+
331
+ </div>
332
+
333
+ <div id="footer">
334
+ Generated on Sat Sep 18 20:44:22 2021 by
335
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
336
+ 0.9.26 (ruby-2.7.4).
337
+ </div>
338
+
339
+ </div>
340
+ </body>
341
+ </html>
@@ -0,0 +1,115 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Module: Zabbix::Api::FaradayMiddleware
8
+
9
+ &mdash; Documentation by YARD 0.9.26
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Zabbix::Api::FaradayMiddleware";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (F)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../Zabbix.html" title="Zabbix (module)">Zabbix</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Api.html" title="Zabbix::Api (module)">Api</a></span></span>
41
+ &raquo;
42
+ <span class="title">FaradayMiddleware</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Module: Zabbix::Api::FaradayMiddleware
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/zabbix/api/client.rb</dd>
82
+ </dl>
83
+
84
+ </div>
85
+
86
+ <h2>Defined Under Namespace</h2>
87
+ <p class="children">
88
+
89
+
90
+
91
+
92
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="FaradayMiddleware/ZabbixApiRequest.html" title="Zabbix::Api::FaradayMiddleware::ZabbixApiRequest (class)">ZabbixApiRequest</a></span>
93
+
94
+
95
+ </p>
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+ </div>
106
+
107
+ <div id="footer">
108
+ Generated on Sat Sep 18 20:44:22 2021 by
109
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
110
+ 0.9.26 (ruby-2.7.4).
111
+ </div>
112
+
113
+ </div>
114
+ </body>
115
+ </html>