twelvedata_ruby 0.3.0 → 0.4.0
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 +4 -4
- data/.rspec +4 -0
- data/.rubocop.yml +102 -0
- data/.yardopts +14 -0
- data/CHANGELOG.md +199 -4
- data/{LICENSE.txt → LICENSE} +1 -1
- data/README.md +392 -88
- data/Rakefile +110 -4
- data/lib/twelvedata_ruby/client.rb +137 -88
- data/lib/twelvedata_ruby/endpoint.rb +292 -242
- data/lib/twelvedata_ruby/error.rb +93 -45
- data/lib/twelvedata_ruby/request.rb +106 -33
- data/lib/twelvedata_ruby/response.rb +268 -110
- data/lib/twelvedata_ruby/utils.rb +91 -14
- data/lib/twelvedata_ruby/version.rb +6 -0
- data/lib/twelvedata_ruby.rb +41 -30
- data/twelvedata_ruby.gemspec +28 -23
- metadata +25 -143
- data/.gitignore +0 -13
- data/Gemfile +0 -6
- data/Gemfile.lock +0 -80
- data/bin/console +0 -22
- data/bin/setup +0 -8
data/twelvedata_ruby.gemspec
CHANGED
@@ -1,37 +1,42 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative "lib/twelvedata_ruby"
|
3
|
+
require_relative "lib/twelvedata_ruby/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "twelvedata_ruby"
|
7
7
|
spec.version = TwelvedataRuby::VERSION
|
8
|
-
spec.authors = ["
|
9
|
-
spec.email = ["
|
10
|
-
|
11
|
-
|
12
|
-
spec.description =
|
13
|
-
|
8
|
+
spec.authors = ["Kenneth C. Demanawa, KCD"]
|
9
|
+
spec.email = ["kenneth.c.demanawa@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = "A Ruby client library for accessing Twelve Data's financial API"
|
12
|
+
spec.description = <<~DESC
|
13
|
+
TwelvedataRuby provides a convenient Ruby interface for accessing Twelve Data's
|
14
|
+
comprehensive financial API, including stock, forex, crypto, and other market data.
|
15
|
+
Features real-time data access, historical data retrieval, and technical indicators.
|
16
|
+
DESC
|
17
|
+
spec.homepage = "https://kanutocd.github.io/twelvedata_ruby"
|
14
18
|
spec.license = "MIT"
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
16
19
|
|
17
|
-
|
20
|
+
spec.metadata = {
|
21
|
+
"homepage_uri" => spec.homepage,
|
22
|
+
"source_code_uri" => "https://github.com/kanutocd/twelvedata_ruby",
|
23
|
+
"changelog_uri" => "https://github.com/kanutocd/twelvedata_ruby/blob/main/CHANGELOG.md",
|
24
|
+
"bug_tracker_uri" => "https://github.com/kanutocd/twelvedata_ruby/issues",
|
25
|
+
"documentation_uri" => "https://kanutocd.github.io/twelvedata_ruby/doc/",
|
26
|
+
"wiki_uri" => "https://github.com/kanutocd/twelvedata_ruby/wiki",
|
27
|
+
"rubygems_mfa_required" => "true",
|
28
|
+
}
|
18
29
|
|
19
|
-
spec.
|
20
|
-
spec.metadata["source_code_uri"] = "https://github.com/kanroyalhigh/twelvedata_ruby"
|
21
|
-
spec.metadata["changelog_uri"] = "https://github.com/kanroyalhigh/twelvedata_ruby/CHANGELOG.md"
|
30
|
+
spec.required_ruby_version = ">= 3.4.0"
|
22
31
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
32
|
+
spec.files = Dir.chdir(__dir__) do
|
33
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
34
|
+
(File.expand_path(f) == __FILE__) ||
|
35
|
+
f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile])
|
36
|
+
end
|
27
37
|
end
|
38
|
+
|
28
39
|
spec.bindir = "exe"
|
29
|
-
spec.executables = spec.files.grep(%r{\Aexe/}) {|f| File.basename(f) }
|
40
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
30
41
|
spec.require_paths = ["lib"]
|
31
|
-
spec.add_dependency "httpx", "~> 0.14", ">= 0.14.5"
|
32
|
-
spec.add_development_dependency "rake", "~> 13.0", ">= 13.0.0"
|
33
|
-
spec.add_development_dependency "rspec", "~> 3.10", ">= 3.10.0"
|
34
|
-
spec.add_development_dependency "rubocop", "~> 1.17", ">= 1.17.0"
|
35
|
-
spec.add_development_dependency "simplecov", "~> 0.21", ">= 0.21.2"
|
36
|
-
spec.add_development_dependency "webmock", "~> 3.13", ">= 3.13.0"
|
37
42
|
end
|
metadata
CHANGED
@@ -1,152 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twelvedata_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
autorequire:
|
7
|
+
- Kenneth C. Demanawa, KCD
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0.14'
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 0.14.5
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
requirements:
|
27
|
-
- - "~>"
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0.14'
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 0.14.5
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: rake
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '13.0'
|
40
|
-
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: 13.0.0
|
43
|
-
type: :development
|
44
|
-
prerelease: false
|
45
|
-
version_requirements: !ruby/object:Gem::Requirement
|
46
|
-
requirements:
|
47
|
-
- - "~>"
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '13.0'
|
50
|
-
- - ">="
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: 13.0.0
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
|
-
name: rspec
|
55
|
-
requirement: !ruby/object:Gem::Requirement
|
56
|
-
requirements:
|
57
|
-
- - "~>"
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
version: '3.10'
|
60
|
-
- - ">="
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: 3.10.0
|
63
|
-
type: :development
|
64
|
-
prerelease: false
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - "~>"
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '3.10'
|
70
|
-
- - ">="
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
version: 3.10.0
|
73
|
-
- !ruby/object:Gem::Dependency
|
74
|
-
name: rubocop
|
75
|
-
requirement: !ruby/object:Gem::Requirement
|
76
|
-
requirements:
|
77
|
-
- - "~>"
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
version: '1.17'
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 1.17.0
|
83
|
-
type: :development
|
84
|
-
prerelease: false
|
85
|
-
version_requirements: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '1.17'
|
90
|
-
- - ">="
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
version: 1.17.0
|
93
|
-
- !ruby/object:Gem::Dependency
|
94
|
-
name: simplecov
|
95
|
-
requirement: !ruby/object:Gem::Requirement
|
96
|
-
requirements:
|
97
|
-
- - "~>"
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
version: '0.21'
|
100
|
-
- - ">="
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: 0.21.2
|
103
|
-
type: :development
|
104
|
-
prerelease: false
|
105
|
-
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - "~>"
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '0.21'
|
110
|
-
- - ">="
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
version: 0.21.2
|
113
|
-
- !ruby/object:Gem::Dependency
|
114
|
-
name: webmock
|
115
|
-
requirement: !ruby/object:Gem::Requirement
|
116
|
-
requirements:
|
117
|
-
- - "~>"
|
118
|
-
- !ruby/object:Gem::Version
|
119
|
-
version: '3.13'
|
120
|
-
- - ">="
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version: 3.13.0
|
123
|
-
type: :development
|
124
|
-
prerelease: false
|
125
|
-
version_requirements: !ruby/object:Gem::Requirement
|
126
|
-
requirements:
|
127
|
-
- - "~>"
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version: '3.13'
|
130
|
-
- - ">="
|
131
|
-
- !ruby/object:Gem::Version
|
132
|
-
version: 3.13.0
|
133
|
-
description: A Ruby gem for accessing Twelve Data's API.
|
10
|
+
date: 2025-07-03 00:00:00.000000000 Z
|
11
|
+
dependencies: []
|
12
|
+
description: |
|
13
|
+
TwelvedataRuby provides a convenient Ruby interface for accessing Twelve Data's
|
14
|
+
comprehensive financial API, including stock, forex, crypto, and other market data.
|
15
|
+
Features real-time data access, historical data retrieval, and technical indicators.
|
134
16
|
email:
|
135
|
-
-
|
17
|
+
- kenneth.c.demanawa@gmail.com
|
136
18
|
executables: []
|
137
19
|
extensions: []
|
138
20
|
extra_rdoc_files: []
|
139
21
|
files:
|
140
|
-
- ".
|
22
|
+
- ".rspec"
|
23
|
+
- ".rubocop.yml"
|
24
|
+
- ".yardopts"
|
141
25
|
- CHANGELOG.md
|
142
26
|
- CODE_OF_CONDUCT.md
|
143
|
-
-
|
144
|
-
- Gemfile.lock
|
145
|
-
- LICENSE.txt
|
27
|
+
- LICENSE
|
146
28
|
- README.md
|
147
29
|
- Rakefile
|
148
|
-
- bin/console
|
149
|
-
- bin/setup
|
150
30
|
- doc/TwelvedataRuby.html
|
151
31
|
- doc/TwelvedataRuby/BadRequestResponseError.html
|
152
32
|
- doc/TwelvedataRuby/Client.html
|
@@ -188,15 +68,19 @@ files:
|
|
188
68
|
- lib/twelvedata_ruby/request.rb
|
189
69
|
- lib/twelvedata_ruby/response.rb
|
190
70
|
- lib/twelvedata_ruby/utils.rb
|
71
|
+
- lib/twelvedata_ruby/version.rb
|
191
72
|
- twelvedata_ruby.gemspec
|
192
|
-
homepage: https://
|
73
|
+
homepage: https://kanutocd.github.io/twelvedata_ruby
|
193
74
|
licenses:
|
194
75
|
- MIT
|
195
76
|
metadata:
|
196
|
-
homepage_uri: https://
|
197
|
-
source_code_uri: https://github.com/
|
198
|
-
changelog_uri: https://github.com/
|
199
|
-
|
77
|
+
homepage_uri: https://kanutocd.github.io/twelvedata_ruby
|
78
|
+
source_code_uri: https://github.com/kanutocd/twelvedata_ruby
|
79
|
+
changelog_uri: https://github.com/kanutocd/twelvedata_ruby/blob/main/CHANGELOG.md
|
80
|
+
bug_tracker_uri: https://github.com/kanutocd/twelvedata_ruby/issues
|
81
|
+
documentation_uri: https://kanutocd.github.io/twelvedata_ruby/doc/
|
82
|
+
wiki_uri: https://github.com/kanutocd/twelvedata_ruby/wiki
|
83
|
+
rubygems_mfa_required: 'true'
|
200
84
|
rdoc_options: []
|
201
85
|
require_paths:
|
202
86
|
- lib
|
@@ -204,16 +88,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
204
88
|
requirements:
|
205
89
|
- - ">="
|
206
90
|
- !ruby/object:Gem::Version
|
207
|
-
version:
|
91
|
+
version: 3.4.0
|
208
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
209
93
|
requirements:
|
210
94
|
- - ">="
|
211
95
|
- !ruby/object:Gem::Version
|
212
96
|
version: '0'
|
213
97
|
requirements: []
|
214
|
-
rubygems_version: 3.2
|
215
|
-
signing_key:
|
98
|
+
rubygems_version: 3.6.2
|
216
99
|
specification_version: 4
|
217
|
-
summary: A Ruby client library
|
218
|
-
API's stock, forex, crypto, and other financial data
|
100
|
+
summary: A Ruby client library for accessing Twelve Data's financial API
|
219
101
|
test_files: []
|
data/.gitignore
DELETED
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
twelvedata_ruby (0.3.0)
|
5
|
-
httpx (~> 0.14, >= 0.14.5)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
addressable (2.8.0)
|
11
|
-
public_suffix (>= 2.0.2, < 5.0)
|
12
|
-
ast (2.4.2)
|
13
|
-
crack (0.4.5)
|
14
|
-
rexml
|
15
|
-
diff-lcs (1.4.4)
|
16
|
-
docile (1.4.0)
|
17
|
-
hashdiff (1.0.1)
|
18
|
-
http-2-next (0.5.0)
|
19
|
-
httpx (0.16.1)
|
20
|
-
http-2-next (>= 0.4.1)
|
21
|
-
timers
|
22
|
-
parallel (1.20.1)
|
23
|
-
parser (3.0.2.0)
|
24
|
-
ast (~> 2.4.1)
|
25
|
-
public_suffix (4.0.6)
|
26
|
-
rainbow (3.0.0)
|
27
|
-
rake (13.0.6)
|
28
|
-
regexp_parser (2.1.1)
|
29
|
-
rexml (3.2.5)
|
30
|
-
rspec (3.10.0)
|
31
|
-
rspec-core (~> 3.10.0)
|
32
|
-
rspec-expectations (~> 3.10.0)
|
33
|
-
rspec-mocks (~> 3.10.0)
|
34
|
-
rspec-core (3.10.1)
|
35
|
-
rspec-support (~> 3.10.0)
|
36
|
-
rspec-expectations (3.10.1)
|
37
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
38
|
-
rspec-support (~> 3.10.0)
|
39
|
-
rspec-mocks (3.10.2)
|
40
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
-
rspec-support (~> 3.10.0)
|
42
|
-
rspec-support (3.10.2)
|
43
|
-
rubocop (1.18.4)
|
44
|
-
parallel (~> 1.10)
|
45
|
-
parser (>= 3.0.0.0)
|
46
|
-
rainbow (>= 2.2.2, < 4.0)
|
47
|
-
regexp_parser (>= 1.8, < 3.0)
|
48
|
-
rexml
|
49
|
-
rubocop-ast (>= 1.8.0, < 2.0)
|
50
|
-
ruby-progressbar (~> 1.7)
|
51
|
-
unicode-display_width (>= 1.4.0, < 3.0)
|
52
|
-
rubocop-ast (1.9.0)
|
53
|
-
parser (>= 3.0.1.1)
|
54
|
-
ruby-progressbar (1.11.0)
|
55
|
-
simplecov (0.21.2)
|
56
|
-
docile (~> 1.1)
|
57
|
-
simplecov-html (~> 0.11)
|
58
|
-
simplecov_json_formatter (~> 0.1)
|
59
|
-
simplecov-html (0.12.3)
|
60
|
-
simplecov_json_formatter (0.1.3)
|
61
|
-
timers (4.3.3)
|
62
|
-
unicode-display_width (2.0.0)
|
63
|
-
webmock (3.14.0)
|
64
|
-
addressable (>= 2.8.0)
|
65
|
-
crack (>= 0.3.2)
|
66
|
-
hashdiff (>= 0.4.0, < 2.0.0)
|
67
|
-
|
68
|
-
PLATFORMS
|
69
|
-
x86_64-darwin-20
|
70
|
-
|
71
|
-
DEPENDENCIES
|
72
|
-
rake (~> 13.0, >= 13.0.0)
|
73
|
-
rspec (~> 3.10, >= 3.10.0)
|
74
|
-
rubocop (~> 1.17, >= 1.17.0)
|
75
|
-
simplecov (~> 0.21, >= 0.21.2)
|
76
|
-
twelvedata_ruby!
|
77
|
-
webmock (~> 3.13, >= 3.13.0)
|
78
|
-
|
79
|
-
BUNDLED WITH
|
80
|
-
2.2.25
|
data/bin/console
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require "bundler/setup"
|
5
|
-
require "twelvedata_ruby"
|
6
|
-
|
7
|
-
require "irb"
|
8
|
-
|
9
|
-
def reload!
|
10
|
-
root_dir = File.expand_path("..", __dir__)
|
11
|
-
orig_verbose = $VERBOSE
|
12
|
-
# suppresss annoying already initialized warnings
|
13
|
-
$VERBOSE = nil
|
14
|
-
puts "Reloading with suppressed warning messages about 'already initialized'..."
|
15
|
-
%w[lib].each do |dir|
|
16
|
-
Dir.glob("#{root_dir}/#{dir}/**/*.rb").each {|f| load(f) }
|
17
|
-
end
|
18
|
-
$VERBOSE = orig_verbose
|
19
|
-
true
|
20
|
-
end
|
21
|
-
|
22
|
-
IRB.start(__FILE__)
|