twelvedata_ruby 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 875e9a7aa6d49ba856df319540c987e48ac4fd04ab8cf10f80d804ac685b27c0
4
- data.tar.gz: 3db748bb0a8945897b87748bd49705a9e435523f71c9c572eadd38363ff5b044
3
+ metadata.gz: bca739fd82cc17f890fa3793d8125fcb31e1c553f6c2303d056f4a1a64ac6610
4
+ data.tar.gz: 54813515e1e086fe341ffeb4a08502843e1c0ae0f4239dd890e55570381c9fd2
5
5
  SHA512:
6
- metadata.gz: da38162ec79f04bd05c69baa4ee8aa26c2419f557503fe6850f7babd3b10125536bc54e444000a8a8876ea99c754f38b195b6f5227130081f258945ef0bae7c5
7
- data.tar.gz: a3bb92af00adeff804939396c2423a087bccfde71c12905b2a5e047aa4d93c5b446eed6ae123310490e7b9aacd23f6beaa2d5fa7314304a33163ff6d03a35f58
6
+ metadata.gz: a3e77b8dafd422258e5dee1ddf68f8c48595ead5758bf3b6e084b125bf14f2b5c54091c7464b9b6a152aec4696bf1f48199e7ffb72318e67784693b469446d41
7
+ data.tar.gz: 06c8fe4b17c366881fc4555d697ac276e9dc8e3956dfd6dabe5aea473e91d58a1044f5af51773586fbe3900baca8ac08fdb1436c1e9fb075768becfb9d95be3e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- twelvedata_ruby (0.1.1)
4
+ twelvedata_ruby (0.2.0)
5
5
  httpx (~> 0.14.5)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -105,8 +105,37 @@ resp_objects_array = TwelvedataRuby::Client.request(quote_req, timeseries_req, e
105
105
  Be caution that the above example, depending on the number request objects sent and how large the responses, hitting the daily limit is likely possible. But then again if you have several api keys you might be able to supply each request object with its own apikey. :)
106
106
 
107
107
 
108
- TODO: write more documenation especially the response object
108
+ The data from a successful API request can be access from `Response#parsed_body`. If request format is `:json` then it will be a `Hash` instance
109
109
 
110
+ ```ruby
111
+ TwelvedataRuby.client.quote(symbol: "GOOG").parsed_body
112
+ =>
113
+ {:symbol=>"GOOG",
114
+ :name=>"Alphabet Inc",
115
+ :exchange=>"NASDAQ",
116
+ :currency=>"USD",
117
+ :datetime=>"2021-07-15",
118
+ :open=>"2650.00000",
119
+ :high=>"2651.89990",
120
+ :low=>"2611.95996",
121
+ :close=>"2625.33008",
122
+ :volume=>"828300",
123
+ :previous_close=>"2641.64990",
124
+ :change=>"-16.31982",
125
+ :percent_change=>"-0.61779",
126
+ :average_volume=>"850344",
127
+ :fifty_two_week=>{:low=>"1406.55005", :high=>"2659.91992", :low_change=>"1218.78003", :high_change=>"-34.58984", :low_change_percent=>"86.65031", :high_change_percent=>"-1.30041", :range=>"1406.550049 - 2659.919922"}}
128
+ ```
129
+
130
+ Likewise, if the API request format is `:csv` then `Response#parsed_body` will be `CSV#Table` instance
131
+
132
+ ```ruby
133
+ TwelvedataRuby.client.quote(symbol: "GOOG", format: :csv).parsed_body
134
+ => #<CSV::Table mode:col_or_row row_count:2>
135
+ ```
136
+
137
+ ## Documentation
138
+ You can browse the source code [documentation](https://kanroyalhigh.github.io/twelvedata_ruby/doc/)
110
139
  ## Contributing
111
140
 
112
141
  Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/twelvedata_ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/twelvedata_ruby/blob/master/CODE_OF_CONDUCT.md).
@@ -149,7 +149,7 @@
149
149
 
150
150
  </div>
151
151
  </dt>
152
- <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.1.0</span><span class='tstring_end'>&quot;</span></span></pre></dd>
152
+ <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.1.1</span><span class='tstring_end'>&quot;</span></span></pre></dd>
153
153
 
154
154
  </dl>
155
155
 
@@ -343,7 +343,7 @@
343
343
  </div>
344
344
 
345
345
  <div id="footer">
346
- Generated on Tue Jul 13 08:56:48 2021 by
346
+ Generated on Fri Jul 16 20:51:23 2021 by
347
347
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
348
348
  0.9.26 (ruby-3.0.1).
349
349
  </div>
@@ -168,7 +168,7 @@
168
168
  </div>
169
169
 
170
170
  <div id="footer">
171
- Generated on Tue Jul 13 08:56:50 2021 by
171
+ Generated on Fri Jul 16 20:51:24 2021 by
172
172
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
173
173
  0.9.26 (ruby-3.0.1).
174
174
  </div>
@@ -1433,7 +1433,7 @@
1433
1433
  </div>
1434
1434
 
1435
1435
  <div id="footer">
1436
- Generated on Tue Jul 13 08:56:52 2021 by
1436
+ Generated on Fri Jul 16 20:51:25 2021 by
1437
1437
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1438
1438
  0.9.26 (ruby-3.0.1).
1439
1439
  </div>
@@ -1468,7 +1468,7 @@
1468
1468
  </div>
1469
1469
 
1470
1470
  <div id="footer">
1471
- Generated on Tue Jul 13 08:56:54 2021 by
1471
+ Generated on Fri Jul 16 20:51:25 2021 by
1472
1472
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1473
1473
  0.9.26 (ruby-3.0.1).
1474
1474
  </div>
@@ -237,7 +237,7 @@
237
237
  </div>
238
238
 
239
239
  <div id="footer">
240
- Generated on Tue Jul 13 08:56:49 2021 by
240
+ Generated on Fri Jul 16 20:51:23 2021 by
241
241
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
242
242
  0.9.26 (ruby-3.0.1).
243
243
  </div>
@@ -157,7 +157,7 @@
157
157
  </div>
158
158
 
159
159
  <div id="footer">
160
- Generated on Tue Jul 13 08:56:49 2021 by
160
+ Generated on Fri Jul 16 20:51:23 2021 by
161
161
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
162
162
  0.9.26 (ruby-3.0.1).
163
163
  </div>
@@ -157,7 +157,7 @@
157
157
  </div>
158
158
 
159
159
  <div id="footer">
160
- Generated on Tue Jul 13 08:56:49 2021 by
160
+ Generated on Fri Jul 16 20:51:23 2021 by
161
161
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
162
162
  0.9.26 (ruby-3.0.1).
163
163
  </div>
@@ -157,7 +157,7 @@
157
157
  </div>
158
158
 
159
159
  <div id="footer">
160
- Generated on Tue Jul 13 08:56:49 2021 by
160
+ Generated on Fri Jul 16 20:51:24 2021 by
161
161
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
162
162
  0.9.26 (ruby-3.0.1).
163
163
  </div>
@@ -308,7 +308,7 @@
308
308
  </div>
309
309
 
310
310
  <div id="footer">
311
- Generated on Tue Jul 13 08:56:48 2021 by
311
+ Generated on Fri Jul 16 20:51:23 2021 by
312
312
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
313
313
  0.9.26 (ruby-3.0.1).
314
314
  </div>
@@ -168,7 +168,7 @@
168
168
  </div>
169
169
 
170
170
  <div id="footer">
171
- Generated on Tue Jul 13 08:56:50 2021 by
171
+ Generated on Fri Jul 16 20:51:24 2021 by
172
172
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
173
173
  0.9.26 (ruby-3.0.1).
174
174
  </div>
@@ -168,7 +168,7 @@
168
168
  </div>
169
169
 
170
170
  <div id="footer">
171
- Generated on Tue Jul 13 08:56:51 2021 by
171
+ Generated on Fri Jul 16 20:51:24 2021 by
172
172
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
173
173
  0.9.26 (ruby-3.0.1).
174
174
  </div>
@@ -168,7 +168,7 @@
168
168
  </div>
169
169
 
170
170
  <div id="footer">
171
- Generated on Tue Jul 13 08:56:50 2021 by
171
+ Generated on Fri Jul 16 20:51:24 2021 by
172
172
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
173
173
  0.9.26 (ruby-3.0.1).
174
174
  </div>
@@ -168,7 +168,7 @@
168
168
  </div>
169
169
 
170
170
  <div id="footer">
171
- Generated on Tue Jul 13 08:56:51 2021 by
171
+ Generated on Fri Jul 16 20:51:24 2021 by
172
172
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
173
173
  0.9.26 (ruby-3.0.1).
174
174
  </div>
@@ -168,7 +168,7 @@
168
168
  </div>
169
169
 
170
170
  <div id="footer">
171
- Generated on Tue Jul 13 08:56:51 2021 by
171
+ Generated on Fri Jul 16 20:51:24 2021 by
172
172
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
173
173
  0.9.26 (ruby-3.0.1).
174
174
  </div>
@@ -673,7 +673,7 @@
673
673
  </div>
674
674
 
675
675
  <div id="footer">
676
- Generated on Tue Jul 13 08:56:53 2021 by
676
+ Generated on Fri Jul 16 20:51:25 2021 by
677
677
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
678
678
  0.9.26 (ruby-3.0.1).
679
679
  </div>
@@ -1612,7 +1612,7 @@
1612
1612
  </div>
1613
1613
 
1614
1614
  <div id="footer">
1615
- Generated on Tue Jul 13 08:56:55 2021 by
1615
+ Generated on Fri Jul 16 20:51:26 2021 by
1616
1616
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1617
1617
  0.9.26 (ruby-3.0.1).
1618
1618
  </div>
@@ -555,7 +555,7 @@
555
555
  </div>
556
556
 
557
557
  <div id="footer">
558
- Generated on Tue Jul 13 08:56:50 2021 by
558
+ Generated on Fri Jul 16 20:51:24 2021 by
559
559
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
560
560
  0.9.26 (ruby-3.0.1).
561
561
  </div>
@@ -168,7 +168,7 @@
168
168
  </div>
169
169
 
170
170
  <div id="footer">
171
- Generated on Tue Jul 13 08:56:51 2021 by
171
+ Generated on Fri Jul 16 20:51:24 2021 by
172
172
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
173
173
  0.9.26 (ruby-3.0.1).
174
174
  </div>
@@ -168,7 +168,7 @@
168
168
  </div>
169
169
 
170
170
  <div id="footer">
171
- Generated on Tue Jul 13 08:56:50 2021 by
171
+ Generated on Fri Jul 16 20:51:24 2021 by
172
172
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
173
173
  0.9.26 (ruby-3.0.1).
174
174
  </div>
@@ -493,7 +493,7 @@
493
493
  </div>
494
494
 
495
495
  <div id="footer">
496
- Generated on Tue Jul 13 08:56:48 2021 by
496
+ Generated on Fri Jul 16 20:51:23 2021 by
497
497
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
498
498
  0.9.26 (ruby-3.0.1).
499
499
  </div>
data/doc/_index.html CHANGED
@@ -305,7 +305,7 @@
305
305
  </div>
306
306
 
307
307
  <div id="footer">
308
- Generated on Tue Jul 13 08:56:45 2021 by
308
+ Generated on Fri Jul 16 20:51:22 2021 by
309
309
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
310
310
  0.9.26 (ruby-3.0.1).
311
311
  </div>
data/doc/file.README.html CHANGED
@@ -164,9 +164,38 @@ resp_objects_array = TwelvedataRuby::Client.request(quote_req, timeseries_req, e
164
164
 
165
165
  <p>Be caution that the above example, depending on the number request objects sent and how large the responses, hitting the daily limit is likely possible. But then again if you have several api keys you might be able to supply each request object with its own apikey. :)</p>
166
166
 
167
- <p>TODO: write more documenation especially the response object</p>
167
+ <p>The data from a successful API request can be access from <code>Response#parsed_body</code>. If request format is <code>:json</code> then it will be a <code>Hash</code> instance</p>
168
168
 
169
- <h2 id="contributing">Contributing</h2>
169
+ <p><code>ruby
170
+ TwelvedataRuby.client.quote(symbol: "GOOG").parsed_body
171
+ =&gt;
172
+ {:symbol=&gt;"GOOG",
173
+ :name=&gt;"Alphabet Inc",
174
+ :exchange=&gt;"NASDAQ",
175
+ :currency=&gt;"USD",
176
+ :datetime=&gt;"2021-07-15",
177
+ :open=&gt;"2650.00000",
178
+ :high=&gt;"2651.89990",
179
+ :low=&gt;"2611.95996",
180
+ :close=&gt;"2625.33008",
181
+ :volume=&gt;"828300",
182
+ :previous_close=&gt;"2641.64990",
183
+ :change=&gt;"-16.31982",
184
+ :percent_change=&gt;"-0.61779",
185
+ :average_volume=&gt;"850344",
186
+ :fifty_two_week=&gt;{:low=&gt;"1406.55005", :high=&gt;"2659.91992", :low_change=&gt;"1218.78003", :high_change=&gt;"-34.58984", :low_change_percent=&gt;"86.65031", :high_change_percent=&gt;"-1.30041", :range=&gt;"1406.550049 - 2659.919922"}}
187
+ </code></p>
188
+
189
+ <p>Likewise, if the API request format is <code>:csv</code> then <code>Response#parsed_body</code> will be <code>CSV#Table</code> instance</p>
190
+
191
+ <p><code>ruby
192
+ TwelvedataRuby.client.quote(symbol: "GOOG", format: :csv).parsed_body
193
+ =&gt; #&lt;CSV::Table mode:col_or_row row_count:2&gt;
194
+ </code></p>
195
+
196
+ <h2 id="documentation">Documentation</h2>
197
+ <p>You can browse the source code <a href="https://kanroyalhigh.github.io/twelvedata_ruby/doc/">documentation</a>
198
+ ## Contributing</p>
170
199
 
171
200
  <p>Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/twelvedata_ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the <a href="https://github.com/[USERNAME]/twelvedata_ruby/blob/master/CODE_OF_CONDUCT.md">code of conduct</a>.</p>
172
201
 
@@ -184,7 +213,7 @@ resp_objects_array = TwelvedataRuby::Client.request(quote_req, timeseries_req, e
184
213
  </div></div>
185
214
 
186
215
  <div id="footer">
187
- Generated on Tue Jul 13 08:56:46 2021 by
216
+ Generated on Fri Jul 16 20:51:22 2021 by
188
217
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
189
218
  0.9.26 (ruby-3.0.1).
190
219
  </div>
data/doc/index.html CHANGED
@@ -164,9 +164,38 @@ resp_objects_array = TwelvedataRuby::Client.request(quote_req, timeseries_req, e
164
164
 
165
165
  <p>Be caution that the above example, depending on the number request objects sent and how large the responses, hitting the daily limit is likely possible. But then again if you have several api keys you might be able to supply each request object with its own apikey. :)</p>
166
166
 
167
- <p>TODO: write more documenation especially the response object</p>
167
+ <p>The data from a successful API request can be access from <code>Response#parsed_body</code>. If request format is <code>:json</code> then it will be a <code>Hash</code> instance</p>
168
168
 
169
- <h2 id="contributing">Contributing</h2>
169
+ <p><code>ruby
170
+ TwelvedataRuby.client.quote(symbol: "GOOG").parsed_body
171
+ =&gt;
172
+ {:symbol=&gt;"GOOG",
173
+ :name=&gt;"Alphabet Inc",
174
+ :exchange=&gt;"NASDAQ",
175
+ :currency=&gt;"USD",
176
+ :datetime=&gt;"2021-07-15",
177
+ :open=&gt;"2650.00000",
178
+ :high=&gt;"2651.89990",
179
+ :low=&gt;"2611.95996",
180
+ :close=&gt;"2625.33008",
181
+ :volume=&gt;"828300",
182
+ :previous_close=&gt;"2641.64990",
183
+ :change=&gt;"-16.31982",
184
+ :percent_change=&gt;"-0.61779",
185
+ :average_volume=&gt;"850344",
186
+ :fifty_two_week=&gt;{:low=&gt;"1406.55005", :high=&gt;"2659.91992", :low_change=&gt;"1218.78003", :high_change=&gt;"-34.58984", :low_change_percent=&gt;"86.65031", :high_change_percent=&gt;"-1.30041", :range=&gt;"1406.550049 - 2659.919922"}}
187
+ </code></p>
188
+
189
+ <p>Likewise, if the API request format is <code>:csv</code> then <code>Response#parsed_body</code> will be <code>CSV#Table</code> instance</p>
190
+
191
+ <p><code>ruby
192
+ TwelvedataRuby.client.quote(symbol: "GOOG", format: :csv).parsed_body
193
+ =&gt; #&lt;CSV::Table mode:col_or_row row_count:2&gt;
194
+ </code></p>
195
+
196
+ <h2 id="documentation">Documentation</h2>
197
+ <p>You can browse the source code <a href="https://kanroyalhigh.github.io/twelvedata_ruby/doc/">documentation</a>
198
+ ## Contributing</p>
170
199
 
171
200
  <p>Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/twelvedata_ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the <a href="https://github.com/[USERNAME]/twelvedata_ruby/blob/master/CODE_OF_CONDUCT.md">code of conduct</a>.</p>
172
201
 
@@ -184,7 +213,7 @@ resp_objects_array = TwelvedataRuby::Client.request(quote_req, timeseries_req, e
184
213
  </div></div>
185
214
 
186
215
  <div id="footer">
187
- Generated on Tue Jul 13 08:56:46 2021 by
216
+ Generated on Fri Jul 16 20:51:22 2021 by
188
217
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
189
218
  0.9.26 (ruby-3.0.1).
190
219
  </div>
@@ -100,7 +100,7 @@
100
100
  </div>
101
101
 
102
102
  <div id="footer">
103
- Generated on Tue Jul 13 08:56:46 2021 by
103
+ Generated on Fri Jul 16 20:51:23 2021 by
104
104
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
105
105
  0.9.26 (ruby-3.0.1).
106
106
  </div>
@@ -12,7 +12,7 @@ require_relative "twelvedata_ruby/client"
12
12
  module TwelvedataRuby
13
13
  # Holds the current version
14
14
  # @return [String] version number
15
- VERSION = "0.1.1"
15
+ VERSION = "0.2.0"
16
16
 
17
17
  # A convenient and clearer way of getting and overriding default attribute values of the singleton `Client.instance`
18
18
  #
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.summary = "A Ruby client library that provides helping hands in accessing Twelve Data API's stock, \
11
11
  forex, crypto, and other financial data"
12
12
  spec.description = "A Ruby gem for accessing Twelve Data's API."
13
- spec.homepage = "https://github.com/kanroyalhigh/twelvedata_ruby"
13
+ spec.homepage = "https://kanroyalhigh.github.io/twelvedata_ruby"
14
14
  spec.license = "MIT"
15
15
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
16
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twelvedata_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kendo Camajalan, KCD
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-13 00:00:00.000000000 Z
11
+ date: 2021-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpx
@@ -171,11 +171,11 @@ files:
171
171
  - lib/twelvedata_ruby/response.rb
172
172
  - lib/twelvedata_ruby/utils.rb
173
173
  - twelvedata_ruby.gemspec
174
- homepage: https://github.com/kanroyalhigh/twelvedata_ruby
174
+ homepage: https://kanroyalhigh.github.io/twelvedata_ruby
175
175
  licenses:
176
176
  - MIT
177
177
  metadata:
178
- homepage_uri: https://github.com/kanroyalhigh/twelvedata_ruby
178
+ homepage_uri: https://kanroyalhigh.github.io/twelvedata_ruby
179
179
  source_code_uri: https://github.com/kanroyalhigh/twelvedata_ruby
180
180
  changelog_uri: https://github.com/kanroyalhigh/twelvedata_ruby/CHANGELOG.md
181
181
  post_install_message: