twelvedata_ruby 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +13 -0
  3. data/CHANGELOG.md +5 -0
  4. data/CODE_OF_CONDUCT.md +84 -0
  5. data/Gemfile +6 -0
  6. data/Gemfile.lock +80 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +125 -0
  9. data/Rakefile +12 -0
  10. data/bin/console +22 -0
  11. data/bin/setup +8 -0
  12. data/doc/TwelvedataRuby.html +353 -0
  13. data/doc/TwelvedataRuby/BadRequestResponseError.html +178 -0
  14. data/doc/TwelvedataRuby/Client.html +1443 -0
  15. data/doc/TwelvedataRuby/Endpoint.html +1478 -0
  16. data/doc/TwelvedataRuby/EndpointError.html +247 -0
  17. data/doc/TwelvedataRuby/EndpointNameError.html +167 -0
  18. data/doc/TwelvedataRuby/EndpointParametersKeysError.html +167 -0
  19. data/doc/TwelvedataRuby/EndpointRequiredParametersError.html +167 -0
  20. data/doc/TwelvedataRuby/Error.html +318 -0
  21. data/doc/TwelvedataRuby/ForbiddenResponseError.html +178 -0
  22. data/doc/TwelvedataRuby/InternalServerResponseErro.html +178 -0
  23. data/doc/TwelvedataRuby/NotFoundResponseError.html +178 -0
  24. data/doc/TwelvedataRuby/PageNotFoundResponseError.html +178 -0
  25. data/doc/TwelvedataRuby/ParameterTooLongResponseError.html +178 -0
  26. data/doc/TwelvedataRuby/Request.html +683 -0
  27. data/doc/TwelvedataRuby/Response.html +1622 -0
  28. data/doc/TwelvedataRuby/ResponseError.html +565 -0
  29. data/doc/TwelvedataRuby/TooManyRequestsResponseError.html +178 -0
  30. data/doc/TwelvedataRuby/UnauthorizedResponseError.html +178 -0
  31. data/doc/TwelvedataRuby/Utils.html +503 -0
  32. data/doc/_index.html +315 -0
  33. data/doc/class_list.html +51 -0
  34. data/doc/css/common.css +1 -0
  35. data/doc/css/full_list.css +58 -0
  36. data/doc/css/style.css +497 -0
  37. data/doc/file.README.html +194 -0
  38. data/doc/file_list.html +56 -0
  39. data/doc/frames.html +17 -0
  40. data/doc/index.html +194 -0
  41. data/doc/js/app.js +314 -0
  42. data/doc/js/full_list.js +216 -0
  43. data/doc/js/jquery.js +4 -0
  44. data/doc/method_list.html +707 -0
  45. data/doc/top-level-namespace.html +110 -0
  46. data/lib/twelvedata_ruby.rb +43 -0
  47. data/lib/twelvedata_ruby/client.rb +148 -0
  48. data/lib/twelvedata_ruby/endpoint.rb +271 -0
  49. data/lib/twelvedata_ruby/error.rb +90 -0
  50. data/lib/twelvedata_ruby/request.rb +54 -0
  51. data/lib/twelvedata_ruby/response.rb +132 -0
  52. data/lib/twelvedata_ruby/utils.rb +36 -0
  53. data/twelvedata_ruby.gemspec +37 -0
  54. metadata +201 -0
@@ -0,0 +1,178 @@
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
+ Exception: TwelvedataRuby::BadRequestResponseError
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 = "TwelvedataRuby::BadRequestResponseError";
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 (B)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../TwelvedataRuby.html" title="TwelvedataRuby (module)">TwelvedataRuby</a></span></span>
41
+ &raquo;
42
+ <span class="title">BadRequestResponseError</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>Exception: TwelvedataRuby::BadRequestResponseError
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="ResponseError.html" title="TwelvedataRuby::ResponseError (class)">ResponseError</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">StandardError</li>
78
+
79
+ <li class="next"><span class='object_link'><a href="Error.html" title="TwelvedataRuby::Error (class)">Error</a></span></li>
80
+
81
+ <li class="next"><span class='object_link'><a href="ResponseError.html" title="TwelvedataRuby::ResponseError (class)">ResponseError</a></span></li>
82
+
83
+ <li class="next">TwelvedataRuby::BadRequestResponseError</li>
84
+
85
+ </ul>
86
+ <a href="#" class="inheritanceTree">show all</a>
87
+
88
+ </dd>
89
+ </dl>
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+ <dl>
102
+ <dt>Defined in:</dt>
103
+ <dd>lib/twelvedata_ruby/error.rb</dd>
104
+ </dl>
105
+
106
+ </div>
107
+
108
+
109
+
110
+
111
+ <h2>Constant Summary</h2>
112
+
113
+ <h3 class="inherited">Constants inherited
114
+ from <span class='object_link'><a href="ResponseError.html" title="TwelvedataRuby::ResponseError (class)">ResponseError</a></span></h3>
115
+ <p class="inherited"><span class='object_link'><a href="ResponseError.html#API_ERROR_CODES_MAP-constant" title="TwelvedataRuby::ResponseError::API_ERROR_CODES_MAP (constant)">ResponseError::API_ERROR_CODES_MAP</a></span>, <span class='object_link'><a href="ResponseError.html#HTTP_ERROR_CODES_MAP-constant" title="TwelvedataRuby::ResponseError::HTTP_ERROR_CODES_MAP (constant)">ResponseError::HTTP_ERROR_CODES_MAP</a></span></p>
116
+
117
+
118
+
119
+ <h3 class="inherited">Constants inherited
120
+ from <span class='object_link'><a href="Error.html" title="TwelvedataRuby::Error (class)">Error</a></span></h3>
121
+ <p class="inherited"><span class='object_link'><a href="Error.html#DEFAULT_MSGS-constant" title="TwelvedataRuby::Error::DEFAULT_MSGS (constant)">Error::DEFAULT_MSGS</a></span></p>
122
+
123
+
124
+
125
+
126
+ <h2>Instance Attribute Summary</h2>
127
+
128
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="ResponseError.html" title="TwelvedataRuby::ResponseError (class)">ResponseError</a></span></h3>
129
+ <p class="inherited"><span class='object_link'><a href="ResponseError.html#code-instance_method" title="TwelvedataRuby::ResponseError#code (method)">#code</a></span>, <span class='object_link'><a href="ResponseError.html#json-instance_method" title="TwelvedataRuby::ResponseError#json (method)">#json</a></span>, <span class='object_link'><a href="ResponseError.html#request-instance_method" title="TwelvedataRuby::ResponseError#request (method)">#request</a></span></p>
130
+
131
+
132
+
133
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Error.html" title="TwelvedataRuby::Error (class)">Error</a></span></h3>
134
+ <p class="inherited"><span class='object_link'><a href="Error.html#attrs-instance_method" title="TwelvedataRuby::Error#attrs (method)">#attrs</a></span></p>
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+ <h2>Method Summary</h2>
145
+
146
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="ResponseError.html" title="TwelvedataRuby::ResponseError (class)">ResponseError</a></span></h3>
147
+ <p class="inherited"><span class='object_link'><a href="ResponseError.html#error_code_klass-class_method" title="TwelvedataRuby::ResponseError.error_code_klass (method)">error_code_klass</a></span>, <span class='object_link'><a href="ResponseError.html#initialize-instance_method" title="TwelvedataRuby::ResponseError#initialize (method)">#initialize</a></span></p>
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Error.html" title="TwelvedataRuby::Error (class)">Error</a></span></h3>
158
+ <p class="inherited"><span class='object_link'><a href="Error.html#initialize-instance_method" title="TwelvedataRuby::Error#initialize (method)">#initialize</a></span></p>
159
+
160
+ <div id="constructor_details" class="method_details_list">
161
+ <h2>Constructor Details</h2>
162
+
163
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="ResponseError.html#initialize-instance_method" title="TwelvedataRuby::ResponseError#initialize (method)">TwelvedataRuby::ResponseError</a></span></p>
164
+
165
+ </div>
166
+
167
+
168
+ </div>
169
+
170
+ <div id="footer">
171
+ Generated on Tue Jul 13 08:56:50 2021 by
172
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
173
+ 0.9.26 (ruby-3.0.1).
174
+ </div>
175
+
176
+ </div>
177
+ </body>
178
+ </html>
@@ -0,0 +1,1443 @@
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: TwelvedataRuby::Client
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 = "TwelvedataRuby::Client";
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 (C)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../TwelvedataRuby.html" title="TwelvedataRuby (module)">TwelvedataRuby</a></span></span>
41
+ &raquo;
42
+ <span class="title">Client</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: TwelvedataRuby::Client
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">TwelvedataRuby::Client</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+ <dl>
91
+ <dt>Includes:</dt>
92
+ <dd>Singleton</dd>
93
+ </dl>
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <dl>
101
+ <dt>Defined in:</dt>
102
+ <dd>lib/twelvedata_ruby/client.rb</dd>
103
+ </dl>
104
+
105
+ </div>
106
+
107
+ <h2>Overview</h2><div class="docstring">
108
+ <div class="discussion">
109
+
110
+ <p>Responsible of the actual communication – sending a valid request</p>
111
+
112
+ <pre class="code ruby"><code class="ruby">and receiving the response -- of the API web server
113
+ </code></pre>
114
+
115
+
116
+ </div>
117
+ </div>
118
+ <div class="tags">
119
+
120
+
121
+ </div>
122
+
123
+ <h2>
124
+ Constant Summary
125
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
126
+ </h2>
127
+
128
+ <dl class="constants">
129
+
130
+ <dt id="APIKEY_ENV_NAME-constant" class="">APIKEY_ENV_NAME =
131
+ <div class="docstring">
132
+ <div class="discussion">
133
+
134
+ <p>Returns the exported shell ENV variable name that holds the apikey.</p>
135
+
136
+
137
+ </div>
138
+ </div>
139
+ <div class="tags">
140
+
141
+ <p class="tag_title">Returns:</p>
142
+ <ul class="return">
143
+
144
+ <li>
145
+
146
+
147
+ <span class='type'>(<tt>String</tt>)</span>
148
+
149
+
150
+
151
+ &mdash;
152
+ <div class='inline'>
153
+ <p>the exported shell ENV variable name that holds the apikey</p>
154
+ </div>
155
+
156
+ </li>
157
+
158
+ </ul>
159
+
160
+ </div>
161
+ </dt>
162
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>TWELVEDATA_API_KEY</span><span class='tstring_end'>&quot;</span></span></pre></dd>
163
+
164
+ <dt id="CONNECT_TIMEOUT-constant" class="">CONNECT_TIMEOUT =
165
+ <div class="docstring">
166
+ <div class="discussion">
167
+
168
+ <p>Returns CONNECT_TIMEOUT default connection timeout in milliseconds.</p>
169
+
170
+
171
+ </div>
172
+ </div>
173
+ <div class="tags">
174
+
175
+ <p class="tag_title">Returns:</p>
176
+ <ul class="return">
177
+
178
+ <li>
179
+
180
+
181
+ <span class='type'>(<tt>Integer</tt>)</span>
182
+
183
+
184
+
185
+ &mdash;
186
+ <div class='inline'>
187
+ <p>CONNECT_TIMEOUT default connection timeout in milliseconds</p>
188
+ </div>
189
+
190
+ </li>
191
+
192
+ </ul>
193
+
194
+ </div>
195
+ </dt>
196
+ <dd><pre class="code"><span class='int'>120</span></pre></dd>
197
+
198
+ <dt id="BASE_URL-constant" class="">BASE_URL =
199
+ <div class="docstring">
200
+ <div class="discussion">
201
+
202
+ <p>Returns valid URI base url string of the API.</p>
203
+
204
+
205
+ </div>
206
+ </div>
207
+ <div class="tags">
208
+
209
+ <p class="tag_title">Returns:</p>
210
+ <ul class="return">
211
+
212
+ <li>
213
+
214
+
215
+ <span class='type'>(<tt>String</tt>)</span>
216
+
217
+
218
+
219
+ &mdash;
220
+ <div class='inline'>
221
+ <p>valid URI base url string of the API</p>
222
+ </div>
223
+
224
+ </li>
225
+
226
+ </ul>
227
+
228
+ </div>
229
+ </dt>
230
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>https://api.twelvedata.com</span><span class='tstring_end'>&quot;</span></span></pre></dd>
231
+
232
+ </dl>
233
+
234
+
235
+
236
+
237
+
238
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
239
+ <ul class="summary">
240
+
241
+ <li class="public ">
242
+ <span class="summary_signature">
243
+
244
+ <a href="#options-instance_method" title="#options (instance method)">#<strong>options</strong> &#x21d2; Hash </a>
245
+
246
+
247
+
248
+ </span>
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+ <span class="summary_desc"><div class='inline'>
262
+ <p>The options writeonly attribute that may contain values to override the default attribute values.</p>
263
+ </div></span>
264
+
265
+ </li>
266
+
267
+
268
+ </ul>
269
+
270
+
271
+
272
+
273
+
274
+ <h2>
275
+ Class Method Summary
276
+ <small><a href="#" class="summary_toggle">collapse</a></small>
277
+ </h2>
278
+
279
+ <ul class="summary">
280
+
281
+ <li class="public ">
282
+ <span class="summary_signature">
283
+
284
+ <a href="#build_requests-class_method" title="build_requests (class method)">.<strong>build_requests</strong>(requests) &#x21d2; Object </a>
285
+
286
+
287
+
288
+ </span>
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+ <span class="summary_desc"><div class='inline'></div></span>
299
+
300
+ </li>
301
+
302
+
303
+ <li class="public ">
304
+ <span class="summary_signature">
305
+
306
+ <a href="#options-class_method" title="options (class method)">.<strong>options</strong> &#x21d2; Object </a>
307
+
308
+
309
+
310
+ </span>
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+ <span class="summary_desc"><div class='inline'></div></span>
321
+
322
+ </li>
323
+
324
+
325
+ <li class="public ">
326
+ <span class="summary_signature">
327
+
328
+ <a href="#origin-class_method" title="origin (class method)">.<strong>origin</strong> &#x21d2; Object </a>
329
+
330
+
331
+
332
+ </span>
333
+
334
+
335
+
336
+
337
+
338
+
339
+
340
+
341
+
342
+ <span class="summary_desc"><div class='inline'></div></span>
343
+
344
+ </li>
345
+
346
+
347
+ <li class="public ">
348
+ <span class="summary_signature">
349
+
350
+ <a href="#request-class_method" title="request (class method)">.<strong>request</strong>(request_objects, opts = {}) &#x21d2; Object </a>
351
+
352
+
353
+
354
+ </span>
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+ <span class="summary_desc"><div class='inline'></div></span>
365
+
366
+ </li>
367
+
368
+
369
+ <li class="public ">
370
+ <span class="summary_signature">
371
+
372
+ <a href="#timeout-class_method" title="timeout (class method)">.<strong>timeout</strong> &#x21d2; Object </a>
373
+
374
+
375
+
376
+ </span>
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+ <span class="summary_desc"><div class='inline'></div></span>
387
+
388
+ </li>
389
+
390
+
391
+ </ul>
392
+
393
+ <h2>
394
+ Instance Method Summary
395
+ <small><a href="#" class="summary_toggle">collapse</a></small>
396
+ </h2>
397
+
398
+ <ul class="summary">
399
+
400
+ <li class="public ">
401
+ <span class="summary_signature">
402
+
403
+ <a href="#apikey-instance_method" title="#apikey (instance method)">#<strong>apikey</strong> &#x21d2; String </a>
404
+
405
+
406
+
407
+ </span>
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+
417
+ <span class="summary_desc"><div class='inline'>
418
+ <p>Apikey value from the instance options Hash object but if nill use the value from <tt><a href="APIKEY_ENV_NAME">ENV</a></tt>.</p>
419
+ </div></span>
420
+
421
+ </li>
422
+
423
+
424
+ <li class="public ">
425
+ <span class="summary_signature">
426
+
427
+ <a href="#apikey=-instance_method" title="#apikey= (instance method)">#<strong>apikey=</strong>(apikey) &#x21d2; String </a>
428
+
429
+
430
+
431
+ </span>
432
+
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+ <span class="summary_desc"><div class='inline'>
442
+ <p>The writer method that can be used to pass manually the value of the <code>apikey</code>.</p>
443
+ </div></span>
444
+
445
+ </li>
446
+
447
+
448
+ <li class="public ">
449
+ <span class="summary_signature">
450
+
451
+ <a href="#apikey_env_var_name-instance_method" title="#apikey_env_var_name (instance method)">#<strong>apikey_env_var_name</strong> &#x21d2; Object </a>
452
+
453
+
454
+
455
+ </span>
456
+
457
+
458
+
459
+
460
+
461
+
462
+
463
+
464
+
465
+ <span class="summary_desc"><div class='inline'>
466
+ <p>The name of the ENVIRONMENT variable that may hold the value of the Twelve Data API key # @return [String] the ENV variable that will be used to fetch from ENV the value of the API key.</p>
467
+ </div></span>
468
+
469
+ </li>
470
+
471
+
472
+ <li class="public ">
473
+ <span class="summary_signature">
474
+
475
+ <a href="#apikey_env_var_name=-instance_method" title="#apikey_env_var_name= (instance method)">#<strong>apikey_env_var_name=</strong>(apikey_env_var_name) &#x21d2; String </a>
476
+
477
+
478
+
479
+ </span>
480
+
481
+
482
+
483
+
484
+
485
+
486
+
487
+
488
+
489
+ <span class="summary_desc"><div class='inline'>
490
+ <p>A setter helper method to configure the ENV variable name of the API key.</p>
491
+ </div></span>
492
+
493
+ </li>
494
+
495
+
496
+ <li class="public ">
497
+ <span class="summary_signature">
498
+
499
+ <a href="#connect_timeout-instance_method" title="#connect_timeout (instance method)">#<strong>connect_timeout</strong> &#x21d2; Object </a>
500
+
501
+
502
+
503
+ </span>
504
+
505
+
506
+
507
+
508
+
509
+
510
+
511
+
512
+
513
+ <span class="summary_desc"><div class='inline'></div></span>
514
+
515
+ </li>
516
+
517
+
518
+ <li class="public ">
519
+ <span class="summary_signature">
520
+
521
+ <a href="#connect_timeout=-instance_method" title="#connect_timeout= (instance method)">#<strong>connect_timeout=</strong>(connect_timeout) &#x21d2; Object </a>
522
+
523
+
524
+
525
+ </span>
526
+
527
+
528
+
529
+
530
+
531
+
532
+
533
+
534
+
535
+ <span class="summary_desc"><div class='inline'></div></span>
536
+
537
+ </li>
538
+
539
+
540
+ <li class="public ">
541
+ <span class="summary_signature">
542
+
543
+ <a href="#fetch-instance_method" title="#fetch (instance method)">#<strong>fetch</strong>(request) &#x21d2; NilClass, ... </a>
544
+
545
+
546
+
547
+ </span>
548
+
549
+
550
+
551
+
552
+
553
+
554
+
555
+
556
+
557
+ <span class="summary_desc"><div class='inline'></div></span>
558
+
559
+ </li>
560
+
561
+
562
+ <li class="public ">
563
+ <span class="summary_signature">
564
+
565
+ <a href="#method_missing-instance_method" title="#method_missing (instance method)">#<strong>method_missing</strong>(endpoint_name, **endpoint_params, &amp;_block) &#x21d2; Object </a>
566
+
567
+
568
+
569
+ </span>
570
+
571
+
572
+
573
+
574
+
575
+
576
+
577
+
578
+
579
+ <span class="summary_desc"><div class='inline'>
580
+ <p>The entry point in dynamically defining instance methods based on the called the valid endpoint names.</p>
581
+ </div></span>
582
+
583
+ </li>
584
+
585
+
586
+ <li class="public ">
587
+ <span class="summary_signature">
588
+
589
+ <a href="#respond_to_missing%3F-instance_method" title="#respond_to_missing? (instance method)">#<strong>respond_to_missing?</strong>(endpoint_name, _include_all = false) &#x21d2; Boolean </a>
590
+
591
+
592
+
593
+ </span>
594
+
595
+
596
+
597
+
598
+
599
+
600
+
601
+
602
+
603
+ <span class="summary_desc"><div class='inline'></div></span>
604
+
605
+ </li>
606
+
607
+
608
+ </ul>
609
+
610
+
611
+
612
+ <div id="method_missing_details" class="method_details_list">
613
+ <h2>Dynamic Method Handling</h2>
614
+ <p class="notice this">
615
+ This class handles dynamic methods through the <tt>method_missing</tt> method
616
+
617
+ </p>
618
+
619
+ <div class="method_details first">
620
+ <h3 class="signature first" id="method_missing-instance_method">
621
+
622
+ #<strong>method_missing</strong>(endpoint_name, **endpoint_params, &amp;_block) &#x21d2; <tt>Object</tt>
623
+
624
+
625
+
626
+
627
+
628
+ </h3><div class="docstring">
629
+ <div class="discussion">
630
+
631
+ <div class="note todo">
632
+ <strong>TODO:</strong>
633
+ <div class='inline'>
634
+ <p>define all the method signatures of the endpoint methods that will meta-programatically defined at runtime.</p>
635
+ </div>
636
+ </div>
637
+
638
+
639
+ <p>The entry point in dynamically defining instance methods based on the called the valid endpoint names.</p>
640
+
641
+
642
+ </div>
643
+ </div>
644
+ <div class="tags">
645
+ <p class="tag_title">Parameters:</p>
646
+ <ul class="param">
647
+
648
+ <li>
649
+
650
+ <span class='name'>endpoint_name</span>
651
+
652
+
653
+ <span class='type'>(<tt>String</tt>)</span>
654
+
655
+
656
+
657
+ &mdash;
658
+ <div class='inline'>
659
+ <p>valid API endpoint name to fetch</p>
660
+ </div>
661
+
662
+ </li>
663
+
664
+ <li>
665
+
666
+ <span class='name'>endpoint_params</span>
667
+
668
+
669
+ <span class='type'>(<tt>Hash</tt>)</span>
670
+
671
+
672
+
673
+ &mdash;
674
+ <div class='inline'>
675
+ <p>the optional/required valid query params of the API endpoint. If <code>:apikey</code> key-value pair is present, the pair will override the <code>#apikey</code> of singleton client instance If <code>:format</code> key-value pair is present and is a valid parameter key and value can only be <code>:csv</code> or <code>:json</code> If <code>:filename</code> key-value is present and <code>:format</code> is <code>:csv</code>, then this is will be added to the payload too.</p>
676
+
677
+ <pre class="code ruby"><code class="ruby">Otherwise, this will just discarded and will not be part of the payload
678
+ </code></pre>
679
+
680
+ <p>If endpoint name and query params used are not valid, EndpointError instances will be returned</p>
681
+
682
+ <pre class="code ruby"><code class="ruby">actual API fetch will not happen. @see #fetch for the rest of the documentation
683
+ </code></pre>
684
+ </div>
685
+
686
+ </li>
687
+
688
+ </ul>
689
+
690
+
691
+ </div><table class="source_code">
692
+ <tr>
693
+ <td>
694
+ <pre class="lines">
695
+
696
+
697
+ 114
698
+ 115
699
+ 116</pre>
700
+ </td>
701
+ <td>
702
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/client.rb', line 114</span>
703
+
704
+ <span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint_name'>endpoint_name</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_endpoint_params'>endpoint_params</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid__block'>_block</span><span class='rparen'>)</span>
705
+ <span class='id identifier rubyid_try_fetch'>try_fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint_name'>endpoint_name</span><span class='comma'>,</span> <span class='id identifier rubyid_endpoint_params'>endpoint_params</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>super</span>
706
+ <span class='kw'>end</span></pre>
707
+ </td>
708
+ </tr>
709
+ </table>
710
+ </div>
711
+
712
+ </div>
713
+
714
+ <div id="instance_attr_details" class="attr_details">
715
+ <h2>Instance Attribute Details</h2>
716
+
717
+
718
+ <span id="options=-instance_method"></span>
719
+ <div class="method_details first">
720
+ <h3 class="signature first" id="options-instance_method">
721
+
722
+ #<strong>options</strong> &#x21d2; <tt>Hash</tt>
723
+
724
+
725
+
726
+
727
+
728
+ </h3><div class="docstring">
729
+ <div class="discussion">
730
+
731
+ <p>Returns the options writeonly attribute that may contain values to override the default attribute values. This attribute writer was automatically called in @see TwelvedataRuby.client(**options).</p>
732
+
733
+
734
+ </div>
735
+ </div>
736
+ <div class="tags">
737
+
738
+ <p class="tag_title">Returns:</p>
739
+ <ul class="return">
740
+
741
+ <li>
742
+
743
+
744
+ <span class='type'>(<tt>Hash</tt>)</span>
745
+
746
+
747
+
748
+ &mdash;
749
+ <div class='inline'>
750
+ <p>the options writeonly attribute that may contain values to override the default attribute values. This attribute writer was automatically called in @see TwelvedataRuby.client(**options).</p>
751
+ </div>
752
+
753
+ </li>
754
+
755
+ </ul>
756
+
757
+ </div><table class="source_code">
758
+ <tr>
759
+ <td>
760
+ <pre class="lines">
761
+
762
+
763
+ 44</pre>
764
+ </td>
765
+ <td>
766
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/client.rb', line 44</span>
767
+
768
+ <span class='id identifier rubyid_attr_writer'>attr_writer</span> <span class='symbol'>:options</span></pre>
769
+ </td>
770
+ </tr>
771
+ </table>
772
+ </div>
773
+
774
+ </div>
775
+
776
+
777
+ <div id="class_method_details" class="method_details_list">
778
+ <h2>Class Method Details</h2>
779
+
780
+
781
+ <div class="method_details first">
782
+ <h3 class="signature first" id="build_requests-class_method">
783
+
784
+ .<strong>build_requests</strong>(requests) &#x21d2; <tt>Object</tt>
785
+
786
+
787
+
788
+
789
+
790
+ </h3><table class="source_code">
791
+ <tr>
792
+ <td>
793
+ <pre class="lines">
794
+
795
+
796
+ 23
797
+ 24
798
+ 25</pre>
799
+ </td>
800
+ <td>
801
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/client.rb', line 23</span>
802
+
803
+ <span class='kw'>def</span> <span class='id identifier rubyid_build_requests'>build_requests</span><span class='lparen'>(</span><span class='id identifier rubyid_requests'>requests</span><span class='rparen'>)</span>
804
+ <span class='const'><span class='object_link'><a href="Utils.html" title="TwelvedataRuby::Utils (module)">Utils</a></span></span><span class='period'>.</span><span class='id identifier rubyid_to_a'><span class='object_link'><a href="Utils.html#to_a-class_method" title="TwelvedataRuby::Utils.to_a (method)">to_a</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_requests'>requests</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:build</span><span class='rparen'>)</span>
805
+ <span class='kw'>end</span></pre>
806
+ </td>
807
+ </tr>
808
+ </table>
809
+ </div>
810
+
811
+ <div class="method_details ">
812
+ <h3 class="signature " id="options-class_method">
813
+
814
+ .<strong>options</strong> &#x21d2; <tt>Object</tt>
815
+
816
+
817
+
818
+
819
+
820
+ </h3><table class="source_code">
821
+ <tr>
822
+ <td>
823
+ <pre class="lines">
824
+
825
+
826
+ 35
827
+ 36
828
+ 37</pre>
829
+ </td>
830
+ <td>
831
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/client.rb', line 35</span>
832
+
833
+ <span class='kw'>def</span> <span class='id identifier rubyid_options'>options</span>
834
+ <span class='id identifier rubyid_origin'>origin</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_timeout'>timeout</span><span class='rparen'>)</span>
835
+ <span class='kw'>end</span></pre>
836
+ </td>
837
+ </tr>
838
+ </table>
839
+ </div>
840
+
841
+ <div class="method_details ">
842
+ <h3 class="signature " id="origin-class_method">
843
+
844
+ .<strong>origin</strong> &#x21d2; <tt>Object</tt>
845
+
846
+
847
+
848
+
849
+
850
+ </h3><table class="source_code">
851
+ <tr>
852
+ <td>
853
+ <pre class="lines">
854
+
855
+
856
+ 27
857
+ 28
858
+ 29</pre>
859
+ </td>
860
+ <td>
861
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/client.rb', line 27</span>
862
+
863
+ <span class='kw'>def</span> <span class='id identifier rubyid_origin'>origin</span>
864
+ <span class='ivar'>@origin</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='label'>origin:</span> <span class='const'><span class='object_link'><a href="#BASE_URL-constant" title="TwelvedataRuby::Client::BASE_URL (constant)">BASE_URL</a></span></span><span class='rbrace'>}</span>
865
+ <span class='kw'>end</span></pre>
866
+ </td>
867
+ </tr>
868
+ </table>
869
+ </div>
870
+
871
+ <div class="method_details ">
872
+ <h3 class="signature " id="request-class_method">
873
+
874
+ .<strong>request</strong>(request_objects, opts = {}) &#x21d2; <tt>Object</tt>
875
+
876
+
877
+
878
+
879
+
880
+ </h3><table class="source_code">
881
+ <tr>
882
+ <td>
883
+ <pre class="lines">
884
+
885
+
886
+ 19
887
+ 20
888
+ 21</pre>
889
+ </td>
890
+ <td>
891
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/client.rb', line 19</span>
892
+
893
+ <span class='kw'>def</span> <span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='id identifier rubyid_request_objects'>request_objects</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
894
+ <span class='const'>HTTPX</span><span class='period'>.</span><span class='id identifier rubyid_with'>with</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='id identifier rubyid_build_requests'>build_requests</span><span class='lparen'>(</span><span class='id identifier rubyid_request_objects'>request_objects</span><span class='rparen'>)</span><span class='rparen'>)</span>
895
+ <span class='kw'>end</span></pre>
896
+ </td>
897
+ </tr>
898
+ </table>
899
+ </div>
900
+
901
+ <div class="method_details ">
902
+ <h3 class="signature " id="timeout-class_method">
903
+
904
+ .<strong>timeout</strong> &#x21d2; <tt>Object</tt>
905
+
906
+
907
+
908
+
909
+
910
+ </h3><table class="source_code">
911
+ <tr>
912
+ <td>
913
+ <pre class="lines">
914
+
915
+
916
+ 31
917
+ 32
918
+ 33</pre>
919
+ </td>
920
+ <td>
921
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/client.rb', line 31</span>
922
+
923
+ <span class='kw'>def</span> <span class='id identifier rubyid_timeout'>timeout</span>
924
+ <span class='lbrace'>{</span><span class='label'>timeout:</span> <span class='lbrace'>{</span><span class='label'>connect_timeout:</span> <span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_connect_timeout'>connect_timeout</span><span class='rbrace'>}</span><span class='rbrace'>}</span>
925
+ <span class='kw'>end</span></pre>
926
+ </td>
927
+ </tr>
928
+ </table>
929
+ </div>
930
+
931
+ </div>
932
+
933
+ <div id="instance_method_details" class="method_details_list">
934
+ <h2>Instance Method Details</h2>
935
+
936
+
937
+ <div class="method_details first">
938
+ <h3 class="signature first" id="apikey-instance_method">
939
+
940
+ #<strong>apikey</strong> &#x21d2; <tt>String</tt>
941
+
942
+
943
+
944
+
945
+
946
+ </h3><div class="docstring">
947
+ <div class="discussion">
948
+
949
+ <p>Returns apikey value from the instance options Hash object but if nill use the value from <tt><a href="APIKEY_ENV_NAME">ENV</a></tt>.</p>
950
+
951
+
952
+ </div>
953
+ </div>
954
+ <div class="tags">
955
+
956
+ <p class="tag_title">Returns:</p>
957
+ <ul class="return">
958
+
959
+ <li>
960
+
961
+
962
+ <span class='type'>(<tt>String</tt>)</span>
963
+
964
+
965
+
966
+ &mdash;
967
+ <div class='inline'>
968
+ <p>apikey value from the instance options Hash object but if nill use the value from <tt><a href="APIKEY_ENV_NAME">ENV</a></tt></p>
969
+ </div>
970
+
971
+ </li>
972
+
973
+ </ul>
974
+
975
+ </div><table class="source_code">
976
+ <tr>
977
+ <td>
978
+ <pre class="lines">
979
+
980
+
981
+ 48
982
+ 49
983
+ 50</pre>
984
+ </td>
985
+ <td>
986
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/client.rb', line 48</span>
987
+
988
+ <span class='kw'>def</span> <span class='id identifier rubyid_apikey'>apikey</span>
989
+ <span class='const'><span class='object_link'><a href="Utils.html" title="TwelvedataRuby::Utils (module)">Utils</a></span></span><span class='period'>.</span><span class='id identifier rubyid_empty_to_nil'><span class='object_link'><a href="Utils.html#empty_to_nil-class_method" title="TwelvedataRuby::Utils.empty_to_nil (method)">empty_to_nil</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:apikey</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='id identifier rubyid_apikey_env_var_name'>apikey_env_var_name</span><span class='rbracket'>]</span>
990
+ <span class='kw'>end</span></pre>
991
+ </td>
992
+ </tr>
993
+ </table>
994
+ </div>
995
+
996
+ <div class="method_details ">
997
+ <h3 class="signature " id="apikey=-instance_method">
998
+
999
+ #<strong>apikey=</strong>(apikey) &#x21d2; <tt>String</tt>
1000
+
1001
+
1002
+
1003
+
1004
+
1005
+ </h3><div class="docstring">
1006
+ <div class="discussion">
1007
+
1008
+ <p>The writer method that can be used to pass manually the value of the <code>apikey</code></p>
1009
+
1010
+
1011
+ </div>
1012
+ </div>
1013
+ <div class="tags">
1014
+ <p class="tag_title">Parameters:</p>
1015
+ <ul class="param">
1016
+
1017
+ <li>
1018
+
1019
+ <span class='name'>apikey</span>
1020
+
1021
+
1022
+ <span class='type'>(<tt>String</tt>)</span>
1023
+
1024
+
1025
+
1026
+ </li>
1027
+
1028
+ </ul>
1029
+
1030
+ <p class="tag_title">Returns:</p>
1031
+ <ul class="return">
1032
+
1033
+ <li>
1034
+
1035
+
1036
+ <span class='type'>(<tt>String</tt>)</span>
1037
+
1038
+
1039
+
1040
+ &mdash;
1041
+ <div class='inline'>
1042
+ <p><code>apikey</code> value</p>
1043
+ </div>
1044
+
1045
+ </li>
1046
+
1047
+ </ul>
1048
+
1049
+ </div><table class="source_code">
1050
+ <tr>
1051
+ <td>
1052
+ <pre class="lines">
1053
+
1054
+
1055
+ 55
1056
+ 56
1057
+ 57</pre>
1058
+ </td>
1059
+ <td>
1060
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/client.rb', line 55</span>
1061
+
1062
+ <span class='kw'>def</span> <span class='id identifier rubyid_apikey='>apikey=</span><span class='lparen'>(</span><span class='id identifier rubyid_apikey'>apikey</span><span class='rparen'>)</span>
1063
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:apikey</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_apikey'>apikey</span>
1064
+ <span class='kw'>end</span></pre>
1065
+ </td>
1066
+ </tr>
1067
+ </table>
1068
+ </div>
1069
+
1070
+ <div class="method_details ">
1071
+ <h3 class="signature " id="apikey_env_var_name-instance_method">
1072
+
1073
+ #<strong>apikey_env_var_name</strong> &#x21d2; <tt>Object</tt>
1074
+
1075
+
1076
+
1077
+
1078
+
1079
+ </h3><div class="docstring">
1080
+ <div class="discussion">
1081
+
1082
+ <p>The name of the ENVIRONMENT variable that may hold the value of the Twelve Data API key # @return [String] the ENV variable that will be used to fetch from ENV the value of the API key</p>
1083
+
1084
+
1085
+ </div>
1086
+ </div>
1087
+ <div class="tags">
1088
+
1089
+
1090
+ </div><table class="source_code">
1091
+ <tr>
1092
+ <td>
1093
+ <pre class="lines">
1094
+
1095
+
1096
+ 69
1097
+ 70
1098
+ 71</pre>
1099
+ </td>
1100
+ <td>
1101
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/client.rb', line 69</span>
1102
+
1103
+ <span class='kw'>def</span> <span class='id identifier rubyid_apikey_env_var_name'>apikey_env_var_name</span>
1104
+ <span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:apikey_env_var_name</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="#APIKEY_ENV_NAME-constant" title="TwelvedataRuby::Client::APIKEY_ENV_NAME (constant)">APIKEY_ENV_NAME</a></span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span>
1105
+ <span class='kw'>end</span></pre>
1106
+ </td>
1107
+ </tr>
1108
+ </table>
1109
+ </div>
1110
+
1111
+ <div class="method_details ">
1112
+ <h3 class="signature " id="apikey_env_var_name=-instance_method">
1113
+
1114
+ #<strong>apikey_env_var_name=</strong>(apikey_env_var_name) &#x21d2; <tt>String</tt>
1115
+
1116
+
1117
+
1118
+
1119
+
1120
+ </h3><div class="docstring">
1121
+ <div class="discussion">
1122
+
1123
+ <p>A setter helper method to configure the ENV variable name of the API key</p>
1124
+
1125
+
1126
+ </div>
1127
+ </div>
1128
+ <div class="tags">
1129
+ <p class="tag_title">Parameters:</p>
1130
+ <ul class="param">
1131
+
1132
+ <li>
1133
+
1134
+ <span class='name'>apikey_env_var_name</span>
1135
+
1136
+
1137
+ <span class='type'>(<tt>String</tt>)</span>
1138
+
1139
+
1140
+
1141
+ </li>
1142
+
1143
+ </ul>
1144
+
1145
+ <p class="tag_title">Returns:</p>
1146
+ <ul class="return">
1147
+
1148
+ <li>
1149
+
1150
+
1151
+ <span class='type'>(<tt>String</tt>)</span>
1152
+
1153
+
1154
+
1155
+ &mdash;
1156
+ <div class='inline'>
1157
+ <p>the ENV variable name</p>
1158
+ </div>
1159
+
1160
+ </li>
1161
+
1162
+ </ul>
1163
+
1164
+ <p class="tag_title">See Also:</p>
1165
+ <ul class="see">
1166
+
1167
+ <li><span class='object_link'><a href="#apikey_env_var_name-instance_method" title="TwelvedataRuby::Client#apikey_env_var_name (method)">#apikey_env_var_name</a></span></li>
1168
+
1169
+ </ul>
1170
+
1171
+ </div><table class="source_code">
1172
+ <tr>
1173
+ <td>
1174
+ <pre class="lines">
1175
+
1176
+
1177
+ 77
1178
+ 78
1179
+ 79</pre>
1180
+ </td>
1181
+ <td>
1182
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/client.rb', line 77</span>
1183
+
1184
+ <span class='kw'>def</span> <span class='id identifier rubyid_apikey_env_var_name='>apikey_env_var_name=</span><span class='lparen'>(</span><span class='id identifier rubyid_apikey_env_var_name'>apikey_env_var_name</span><span class='rparen'>)</span>
1185
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:apikey_env_var_name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_apikey_env_var_name'>apikey_env_var_name</span>
1186
+ <span class='kw'>end</span></pre>
1187
+ </td>
1188
+ </tr>
1189
+ </table>
1190
+ </div>
1191
+
1192
+ <div class="method_details ">
1193
+ <h3 class="signature " id="connect_timeout-instance_method">
1194
+
1195
+ #<strong>connect_timeout</strong> &#x21d2; <tt>Object</tt>
1196
+
1197
+
1198
+
1199
+
1200
+
1201
+ </h3><table class="source_code">
1202
+ <tr>
1203
+ <td>
1204
+ <pre class="lines">
1205
+
1206
+
1207
+ 59
1208
+ 60
1209
+ 61</pre>
1210
+ </td>
1211
+ <td>
1212
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/client.rb', line 59</span>
1213
+
1214
+ <span class='kw'>def</span> <span class='id identifier rubyid_connect_timeout'>connect_timeout</span>
1215
+ <span class='id identifier rubyid_parse_connect_timeout'>parse_connect_timeout</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:connect_timeout</span><span class='rbracket'>]</span><span class='rparen'>)</span>
1216
+ <span class='kw'>end</span></pre>
1217
+ </td>
1218
+ </tr>
1219
+ </table>
1220
+ </div>
1221
+
1222
+ <div class="method_details ">
1223
+ <h3 class="signature " id="connect_timeout=-instance_method">
1224
+
1225
+ #<strong>connect_timeout=</strong>(connect_timeout) &#x21d2; <tt>Object</tt>
1226
+
1227
+
1228
+
1229
+
1230
+
1231
+ </h3><table class="source_code">
1232
+ <tr>
1233
+ <td>
1234
+ <pre class="lines">
1235
+
1236
+
1237
+ 63
1238
+ 64
1239
+ 65</pre>
1240
+ </td>
1241
+ <td>
1242
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/client.rb', line 63</span>
1243
+
1244
+ <span class='kw'>def</span> <span class='id identifier rubyid_connect_timeout='>connect_timeout=</span><span class='lparen'>(</span><span class='id identifier rubyid_connect_timeout'>connect_timeout</span><span class='rparen'>)</span>
1245
+ <span class='id identifier rubyid_parse_connect_timeout'>parse_connect_timeout</span><span class='lparen'>(</span><span class='id identifier rubyid_connect_timeout'>connect_timeout</span><span class='rparen'>)</span>
1246
+ <span class='kw'>end</span></pre>
1247
+ </td>
1248
+ </tr>
1249
+ </table>
1250
+ </div>
1251
+
1252
+ <div class="method_details ">
1253
+ <h3 class="signature " id="fetch-instance_method">
1254
+
1255
+ #<strong>fetch</strong>(request) &#x21d2; <tt>NilClass</tt>, ...
1256
+
1257
+
1258
+
1259
+
1260
+
1261
+ </h3><div class="docstring">
1262
+ <div class="discussion">
1263
+
1264
+
1265
+ </div>
1266
+ </div>
1267
+ <div class="tags">
1268
+ <p class="tag_title">Parameters:</p>
1269
+ <ul class="param">
1270
+
1271
+ <li>
1272
+
1273
+ <span class='name'>request</span>
1274
+
1275
+
1276
+ <span class='type'>(<tt><span class='object_link'><a href="Request.html" title="TwelvedataRuby::Request (class)">Request</a></span></tt>)</span>
1277
+
1278
+
1279
+
1280
+ &mdash;
1281
+ <div class='inline'>
1282
+ <p>built API request object that holds the endpoint payload</p>
1283
+ </div>
1284
+
1285
+ </li>
1286
+
1287
+ </ul>
1288
+
1289
+ <p class="tag_title">Returns:</p>
1290
+ <ul class="return">
1291
+
1292
+ <li>
1293
+
1294
+
1295
+ <span class='type'>(<tt>NilClass</tt>)</span>
1296
+
1297
+
1298
+
1299
+ &mdash;
1300
+ <div class='inline'>
1301
+ <p><code>nil</code> if @param <code>request</code> is not truthy</p>
1302
+ </div>
1303
+
1304
+ </li>
1305
+
1306
+ <li>
1307
+
1308
+
1309
+ <span class='type'>(<tt>Hash</tt>)</span>
1310
+
1311
+
1312
+
1313
+ &mdash;
1314
+ <div class='inline'>
1315
+ <p>:errors if the request is not valid will hold the endpoint errors details @see Endpoint#errors</p>
1316
+ </div>
1317
+
1318
+ </li>
1319
+
1320
+ <li>
1321
+
1322
+
1323
+ <span class='type'>(<tt><span class='object_link'><a href="Response.html" title="TwelvedataRuby::Response (class)">Response</a></span></tt>)</span>
1324
+
1325
+
1326
+
1327
+ &mdash;
1328
+ <div class='inline'>
1329
+ <p>if <code>request</code> is valid and received an actual response from the API server. The response object&#39;s #error may or may not return a kind of ResponseError @see Response#error</p>
1330
+ </div>
1331
+
1332
+ </li>
1333
+
1334
+ <li>
1335
+
1336
+
1337
+ <span class='type'>(<tt><span class='object_link'><a href="ResponseError.html" title="TwelvedataRuby::ResponseError (class)">ResponseError</a></span></tt>)</span>
1338
+
1339
+
1340
+
1341
+ &mdash;
1342
+ <div class='inline'>
1343
+ <p>if the response received did not come from the API server itself.</p>
1344
+ </div>
1345
+
1346
+ </li>
1347
+
1348
+ </ul>
1349
+
1350
+ </div><table class="source_code">
1351
+ <tr>
1352
+ <td>
1353
+ <pre class="lines">
1354
+
1355
+
1356
+ 97
1357
+ 98
1358
+ 99
1359
+ 100
1360
+ 101</pre>
1361
+ </td>
1362
+ <td>
1363
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/client.rb', line 97</span>
1364
+
1365
+ <span class='kw'>def</span> <span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
1366
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>unless</span> <span class='id identifier rubyid_request'>request</span>
1367
+
1368
+ <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_valid?'>valid?</span> <span class='op'>?</span> <span class='const'><span class='object_link'><a href="Response.html" title="TwelvedataRuby::Response (class)">Response</a></span></span><span class='period'>.</span><span class='id identifier rubyid_resolve'><span class='object_link'><a href="Response.html#resolve-class_method" title="TwelvedataRuby::Response.resolve (method)">resolve</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_request'>request</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='lbrace'>{</span><span class='label'>errors:</span> <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_errors'>errors</span><span class='rbrace'>}</span>
1369
+ <span class='kw'>end</span></pre>
1370
+ </td>
1371
+ </tr>
1372
+ </table>
1373
+ </div>
1374
+
1375
+ <div class="method_details ">
1376
+ <h3 class="signature " id="respond_to_missing?-instance_method">
1377
+
1378
+ #<strong>respond_to_missing?</strong>(endpoint_name, _include_all = false) &#x21d2; <tt>Boolean</tt>
1379
+
1380
+
1381
+
1382
+
1383
+
1384
+ </h3><div class="docstring">
1385
+ <div class="discussion">
1386
+
1387
+
1388
+ </div>
1389
+ </div>
1390
+ <div class="tags">
1391
+
1392
+ <p class="tag_title">Returns:</p>
1393
+ <ul class="return">
1394
+
1395
+ <li>
1396
+
1397
+
1398
+ <span class='type'>(<tt>Boolean</tt>)</span>
1399
+
1400
+
1401
+
1402
+ </li>
1403
+
1404
+ </ul>
1405
+
1406
+ </div><table class="source_code">
1407
+ <tr>
1408
+ <td>
1409
+ <pre class="lines">
1410
+
1411
+
1412
+ 122
1413
+ 123
1414
+ 124
1415
+ 125
1416
+ 126</pre>
1417
+ </td>
1418
+ <td>
1419
+ <pre class="code"><span class="info file"># File 'lib/twelvedata_ruby/client.rb', line 122</span>
1420
+
1421
+ <span class='kw'>def</span> <span class='id identifier rubyid_respond_to_missing?'>respond_to_missing?</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint_name'>endpoint_name</span><span class='comma'>,</span> <span class='id identifier rubyid__include_all'>_include_all</span><span class='op'>=</span><span class='kw'>false</span><span class='rparen'>)</span>
1422
+ <span class='const'><span class='object_link'><a href="Utils.html" title="TwelvedataRuby::Utils (module)">Utils</a></span></span><span class='period'>.</span><span class='id identifier rubyid_return_nil_unless_true'><span class='object_link'><a href="Utils.html#return_nil_unless_true-class_method" title="TwelvedataRuby::Utils.return_nil_unless_true (method)">return_nil_unless_true</a></span></span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Endpoint.html" title="TwelvedataRuby::Endpoint (class)">Endpoint</a></span></span><span class='period'>.</span><span class='id identifier rubyid_valid_name?'><span class='object_link'><a href="Endpoint.html#valid_name%3F-class_method" title="TwelvedataRuby::Endpoint.valid_name? (method)">valid_name?</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint_name'>endpoint_name</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='lbrace'>{</span>
1423
+ <span class='id identifier rubyid_define_endpoint_method'>define_endpoint_method</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint_name'>endpoint_name</span><span class='rparen'>)</span>
1424
+ <span class='rbrace'>}</span> <span class='op'>||</span> <span class='kw'>super</span>
1425
+ <span class='kw'>end</span></pre>
1426
+ </td>
1427
+ </tr>
1428
+ </table>
1429
+ </div>
1430
+
1431
+ </div>
1432
+
1433
+ </div>
1434
+
1435
+ <div id="footer">
1436
+ Generated on Tue Jul 13 08:56:52 2021 by
1437
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1438
+ 0.9.26 (ruby-3.0.1).
1439
+ </div>
1440
+
1441
+ </div>
1442
+ </body>
1443
+ </html>