finnhub_ruby 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +201 -0
- data/README.md +164 -0
- data/Rakefile +10 -0
- data/docs/AggregateIndicators.md +19 -0
- data/docs/BasicFinancials.md +21 -0
- data/docs/Company.md +29 -0
- data/docs/CompanyExecutive.md +19 -0
- data/docs/CompanyNewsStatistics.md +21 -0
- data/docs/CompanyProfile.md +71 -0
- data/docs/CompanyProfile2.md +39 -0
- data/docs/CountryMetadata.md +27 -0
- data/docs/CovidInfo.md +23 -0
- data/docs/CryptoCandles.md +29 -0
- data/docs/CryptoSymbol.md +21 -0
- data/docs/DefaultApi.md +2662 -0
- data/docs/Development.md +23 -0
- data/docs/Dividends.md +31 -0
- data/docs/EarningEstimate.md +25 -0
- data/docs/EarningRelease.md +33 -0
- data/docs/EarningResult.md +23 -0
- data/docs/EarningsCalendar.md +17 -0
- data/docs/EarningsCallTranscripts.md +33 -0
- data/docs/EarningsCallTranscriptsList.md +19 -0
- data/docs/EarningsEstimates.md +21 -0
- data/docs/EconomicCalendar.md +17 -0
- data/docs/EconomicCode.md +23 -0
- data/docs/EconomicData.md +19 -0
- data/docs/EconomicEvent.md +31 -0
- data/docs/Estimate.md +25 -0
- data/docs/Filing.md +31 -0
- data/docs/FinancialStatements.md +19 -0
- data/docs/FinancialsAsReported.md +21 -0
- data/docs/ForexCandles.md +29 -0
- data/docs/ForexSymbol.md +21 -0
- data/docs/Forexrates.md +19 -0
- data/docs/FundOwnership.md +19 -0
- data/docs/IPOCalendar.md +17 -0
- data/docs/IPOEvent.md +31 -0
- data/docs/Indicator.md +21 -0
- data/docs/Investor.md +23 -0
- data/docs/InvestorsOwnership.md +19 -0
- data/docs/LastBidAsk.md +25 -0
- data/docs/MajorDevelopments.md +19 -0
- data/docs/News.md +33 -0
- data/docs/NewsSentiment.md +27 -0
- data/docs/PatternRecognition.md +17 -0
- data/docs/PriceTarget.md +27 -0
- data/docs/Quote.md +25 -0
- data/docs/RecommendationTrend.md +29 -0
- data/docs/Report.md +37 -0
- data/docs/RevenueEstimates.md +21 -0
- data/docs/Sentiment.md +19 -0
- data/docs/Split.md +23 -0
- data/docs/Stock.md +21 -0
- data/docs/StockCandles.md +29 -0
- data/docs/StockTranscripts.md +25 -0
- data/docs/SupportResistance.md +17 -0
- data/docs/TechnicalAnalysis.md +19 -0
- data/docs/TickData.md +31 -0
- data/docs/TranscriptContent.md +19 -0
- data/docs/TranscriptParticipant.md +19 -0
- data/docs/Trend.md +17 -0
- data/docs/UpgradeDowngrade.md +27 -0
- data/finnhub_ruby-0.0.1.gem +0 -0
- data/finnhub_ruby-0.0.2.gem +0 -0
- data/finnhub_ruby.gemspec +39 -0
- data/git_push.sh +58 -0
- data/lib/finnhub_ruby.rb +99 -0
- data/lib/finnhub_ruby/api/default_api.rb +3142 -0
- data/lib/finnhub_ruby/api_client.rb +389 -0
- data/lib/finnhub_ruby/api_error.rb +57 -0
- data/lib/finnhub_ruby/configuration.rb +248 -0
- data/lib/finnhub_ruby/models/aggregate_indicators.rb +215 -0
- data/lib/finnhub_ruby/models/basic_financials.rb +226 -0
- data/lib/finnhub_ruby/models/company.rb +267 -0
- data/lib/finnhub_ruby/models/company_executive.rb +219 -0
- data/lib/finnhub_ruby/models/company_news_statistics.rb +227 -0
- data/lib/finnhub_ruby/models/company_profile.rb +477 -0
- data/lib/finnhub_ruby/models/company_profile2.rb +317 -0
- data/lib/finnhub_ruby/models/country_metadata.rb +257 -0
- data/lib/finnhub_ruby/models/covid_info.rb +237 -0
- data/lib/finnhub_ruby/models/crypto_candles.rb +279 -0
- data/lib/finnhub_ruby/models/crypto_symbol.rb +227 -0
- data/lib/finnhub_ruby/models/development.rb +237 -0
- data/lib/finnhub_ruby/models/dividends.rb +277 -0
- data/lib/finnhub_ruby/models/earning_estimate.rb +247 -0
- data/lib/finnhub_ruby/models/earning_release.rb +287 -0
- data/lib/finnhub_ruby/models/earning_result.rb +237 -0
- data/lib/finnhub_ruby/models/earnings_calendar.rb +209 -0
- data/lib/finnhub_ruby/models/earnings_call_transcripts.rb +291 -0
- data/lib/finnhub_ruby/models/earnings_call_transcripts_list.rb +219 -0
- data/lib/finnhub_ruby/models/earnings_estimates.rb +229 -0
- data/lib/finnhub_ruby/models/economic_calendar.rb +209 -0
- data/lib/finnhub_ruby/models/economic_code.rb +237 -0
- data/lib/finnhub_ruby/models/economic_data.rb +219 -0
- data/lib/finnhub_ruby/models/economic_event.rb +277 -0
- data/lib/finnhub_ruby/models/estimate.rb +247 -0
- data/lib/finnhub_ruby/models/filing.rb +277 -0
- data/lib/finnhub_ruby/models/financial_statements.rb +219 -0
- data/lib/finnhub_ruby/models/financials_as_reported.rb +229 -0
- data/lib/finnhub_ruby/models/forex_candles.rb +279 -0
- data/lib/finnhub_ruby/models/forex_symbol.rb +227 -0
- data/lib/finnhub_ruby/models/forexrates.rb +216 -0
- data/lib/finnhub_ruby/models/fund_ownership.rb +219 -0
- data/lib/finnhub_ruby/models/indicator.rb +227 -0
- data/lib/finnhub_ruby/models/investor.rb +237 -0
- data/lib/finnhub_ruby/models/investors_ownership.rb +219 -0
- data/lib/finnhub_ruby/models/ipo_calendar.rb +209 -0
- data/lib/finnhub_ruby/models/ipo_event.rb +277 -0
- data/lib/finnhub_ruby/models/last_bid_ask.rb +247 -0
- data/lib/finnhub_ruby/models/major_developments.rb +219 -0
- data/lib/finnhub_ruby/models/news.rb +287 -0
- data/lib/finnhub_ruby/models/news_sentiment.rb +255 -0
- data/lib/finnhub_ruby/models/pattern_recognition.rb +209 -0
- data/lib/finnhub_ruby/models/price_target.rb +257 -0
- data/lib/finnhub_ruby/models/quote.rb +247 -0
- data/lib/finnhub_ruby/models/recommendation_trend.rb +267 -0
- data/lib/finnhub_ruby/models/report.rb +306 -0
- data/lib/finnhub_ruby/models/revenue_estimates.rb +229 -0
- data/lib/finnhub_ruby/models/sentiment.rb +217 -0
- data/lib/finnhub_ruby/models/split.rb +237 -0
- data/lib/finnhub_ruby/models/stock.rb +227 -0
- data/lib/finnhub_ruby/models/stock_candles.rb +279 -0
- data/lib/finnhub_ruby/models/stock_transcripts.rb +247 -0
- data/lib/finnhub_ruby/models/support_resistance.rb +209 -0
- data/lib/finnhub_ruby/models/technical_analysis.rb +216 -0
- data/lib/finnhub_ruby/models/tick_data.rb +285 -0
- data/lib/finnhub_ruby/models/transcript_content.rb +219 -0
- data/lib/finnhub_ruby/models/transcript_participant.rb +217 -0
- data/lib/finnhub_ruby/models/trend.rb +207 -0
- data/lib/finnhub_ruby/models/upgrade_downgrade.rb +257 -0
- data/lib/finnhub_ruby/version.rb +15 -0
- data/release.sh +2 -0
- data/spec/api/default_api_spec.rb +638 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/aggregate_indicators_spec.rb +47 -0
- data/spec/models/basic_financials_spec.rb +53 -0
- data/spec/models/company_executive_spec.rb +47 -0
- data/spec/models/company_news_statistics_spec.rb +53 -0
- data/spec/models/company_profile2_spec.rb +107 -0
- data/spec/models/company_profile_spec.rb +203 -0
- data/spec/models/company_spec.rb +77 -0
- data/spec/models/country_metadata_spec.rb +71 -0
- data/spec/models/covid_info_spec.rb +59 -0
- data/spec/models/crypto_candles_spec.rb +77 -0
- data/spec/models/crypto_symbol_spec.rb +53 -0
- data/spec/models/development_spec.rb +59 -0
- data/spec/models/dividends_spec.rb +83 -0
- data/spec/models/earning_estimate_spec.rb +65 -0
- data/spec/models/earning_release_spec.rb +89 -0
- data/spec/models/earning_result_spec.rb +59 -0
- data/spec/models/earnings_calendar_spec.rb +41 -0
- data/spec/models/earnings_call_transcripts_list_spec.rb +47 -0
- data/spec/models/earnings_call_transcripts_spec.rb +89 -0
- data/spec/models/earnings_estimates_spec.rb +53 -0
- data/spec/models/economic_calendar_spec.rb +41 -0
- data/spec/models/economic_code_spec.rb +59 -0
- data/spec/models/economic_data_spec.rb +47 -0
- data/spec/models/economic_event_spec.rb +83 -0
- data/spec/models/estimate_spec.rb +65 -0
- data/spec/models/filing_spec.rb +83 -0
- data/spec/models/financial_statements_spec.rb +47 -0
- data/spec/models/financials_as_reported_spec.rb +53 -0
- data/spec/models/forex_candles_spec.rb +77 -0
- data/spec/models/forex_symbol_spec.rb +53 -0
- data/spec/models/forexrates_spec.rb +47 -0
- data/spec/models/fund_ownership_spec.rb +47 -0
- data/spec/models/indicator_spec.rb +53 -0
- data/spec/models/investor_spec.rb +59 -0
- data/spec/models/investors_ownership_spec.rb +47 -0
- data/spec/models/ipo_calendar_spec.rb +41 -0
- data/spec/models/ipo_event_spec.rb +83 -0
- data/spec/models/last_bid_ask_spec.rb +65 -0
- data/spec/models/major_developments_spec.rb +47 -0
- data/spec/models/news_sentiment_spec.rb +71 -0
- data/spec/models/news_spec.rb +89 -0
- data/spec/models/pattern_recognition_spec.rb +41 -0
- data/spec/models/price_target_spec.rb +71 -0
- data/spec/models/quote_spec.rb +65 -0
- data/spec/models/recommendation_trend_spec.rb +77 -0
- data/spec/models/report_spec.rb +101 -0
- data/spec/models/revenue_estimates_spec.rb +53 -0
- data/spec/models/sentiment_spec.rb +47 -0
- data/spec/models/split_spec.rb +59 -0
- data/spec/models/stock_candles_spec.rb +77 -0
- data/spec/models/stock_spec.rb +53 -0
- data/spec/models/stock_transcripts_spec.rb +65 -0
- data/spec/models/support_resistance_spec.rb +41 -0
- data/spec/models/technical_analysis_spec.rb +47 -0
- data/spec/models/tick_data_spec.rb +83 -0
- data/spec/models/transcript_content_spec.rb +47 -0
- data/spec/models/transcript_participant_spec.rb +47 -0
- data/spec/models/trend_spec.rb +41 -0
- data/spec/models/upgrade_downgrade_spec.rb +71 -0
- data/spec/spec_helper.rb +111 -0
- data/test.rb +139 -0
- metadata +364 -0
@@ -0,0 +1,83 @@
|
|
1
|
+
=begin
|
2
|
+
#Finnhub API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for FinnhubRuby::TickData
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'TickData' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = FinnhubRuby::TickData.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of TickData' do
|
31
|
+
it 'should create an instance of TickData' do
|
32
|
+
expect(@instance).to be_instance_of(FinnhubRuby::TickData)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "s"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "skip"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'test attribute "count"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe 'test attribute "total"' do
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe 'test attribute "v"' do
|
60
|
+
it 'should work' do
|
61
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe 'test attribute "p"' do
|
66
|
+
it 'should work' do
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe 'test attribute "t"' do
|
72
|
+
it 'should work' do
|
73
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
describe 'test attribute "x"' do
|
78
|
+
it 'should work' do
|
79
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
=begin
|
2
|
+
#Finnhub API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for FinnhubRuby::TranscriptContent
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'TranscriptContent' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = FinnhubRuby::TranscriptContent.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of TranscriptContent' do
|
31
|
+
it 'should create an instance of TranscriptContent' do
|
32
|
+
expect(@instance).to be_instance_of(FinnhubRuby::TranscriptContent)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "name"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "speech"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
=begin
|
2
|
+
#Finnhub API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for FinnhubRuby::TranscriptParticipant
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'TranscriptParticipant' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = FinnhubRuby::TranscriptParticipant.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of TranscriptParticipant' do
|
31
|
+
it 'should create an instance of TranscriptParticipant' do
|
32
|
+
expect(@instance).to be_instance_of(FinnhubRuby::TranscriptParticipant)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "name"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "description"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
=begin
|
2
|
+
#Finnhub API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for FinnhubRuby::Trend
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'Trend' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = FinnhubRuby::Trend.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of Trend' do
|
31
|
+
it 'should create an instance of Trend' do
|
32
|
+
expect(@instance).to be_instance_of(FinnhubRuby::Trend)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "adx"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
=begin
|
2
|
+
#Finnhub API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for FinnhubRuby::UpgradeDowngrade
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'UpgradeDowngrade' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = FinnhubRuby::UpgradeDowngrade.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of UpgradeDowngrade' do
|
31
|
+
it 'should create an instance of UpgradeDowngrade' do
|
32
|
+
expect(@instance).to be_instance_of(FinnhubRuby::UpgradeDowngrade)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "symbol"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "grade_time"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'test attribute "from_grade"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe 'test attribute "to_grade"' do
|
54
|
+
it 'should work' do
|
55
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
describe 'test attribute "company"' do
|
60
|
+
it 'should work' do
|
61
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
describe 'test attribute "action"' do
|
66
|
+
it 'should work' do
|
67
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
=begin
|
2
|
+
#Finnhub API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
# load the gem
|
14
|
+
require 'finnhub_ruby'
|
15
|
+
|
16
|
+
# The following was generated by the `rspec --init` command. Conventionally, all
|
17
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
18
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
19
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
20
|
+
# files.
|
21
|
+
#
|
22
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
23
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
24
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
25
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
26
|
+
# a separate helper file that requires the additional dependencies and performs
|
27
|
+
# the additional setup, and require it from the spec files that actually need
|
28
|
+
# it.
|
29
|
+
#
|
30
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
31
|
+
# users commonly want.
|
32
|
+
#
|
33
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
34
|
+
RSpec.configure do |config|
|
35
|
+
# rspec-expectations config goes here. You can use an alternate
|
36
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
37
|
+
# assertions if you prefer.
|
38
|
+
config.expect_with :rspec do |expectations|
|
39
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
40
|
+
# and `failure_message` of custom matchers include text for helper methods
|
41
|
+
# defined using `chain`, e.g.:
|
42
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
43
|
+
# # => "be bigger than 2 and smaller than 4"
|
44
|
+
# ...rather than:
|
45
|
+
# # => "be bigger than 2"
|
46
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
47
|
+
end
|
48
|
+
|
49
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
50
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
51
|
+
config.mock_with :rspec do |mocks|
|
52
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
53
|
+
# a real object. This is generally recommended, and will default to
|
54
|
+
# `true` in RSpec 4.
|
55
|
+
mocks.verify_partial_doubles = true
|
56
|
+
end
|
57
|
+
|
58
|
+
# The settings below are suggested to provide a good initial experience
|
59
|
+
# with RSpec, but feel free to customize to your heart's content.
|
60
|
+
=begin
|
61
|
+
# These two settings work together to allow you to limit a spec run
|
62
|
+
# to individual examples or groups you care about by tagging them with
|
63
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
64
|
+
# get run.
|
65
|
+
config.filter_run :focus
|
66
|
+
config.run_all_when_everything_filtered = true
|
67
|
+
|
68
|
+
# Allows RSpec to persist some state between runs in order to support
|
69
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
70
|
+
# you configure your source control system to ignore this file.
|
71
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
72
|
+
|
73
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
74
|
+
# recommended. For more details, see:
|
75
|
+
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
76
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
77
|
+
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
78
|
+
config.disable_monkey_patching!
|
79
|
+
|
80
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
81
|
+
# be too noisy due to issues in dependencies.
|
82
|
+
config.warnings = true
|
83
|
+
|
84
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
85
|
+
# file, and it's useful to allow more verbose output when running an
|
86
|
+
# individual spec file.
|
87
|
+
if config.files_to_run.one?
|
88
|
+
# Use the documentation formatter for detailed output,
|
89
|
+
# unless a formatter has already been configured
|
90
|
+
# (e.g. via a command-line flag).
|
91
|
+
config.default_formatter = 'doc'
|
92
|
+
end
|
93
|
+
|
94
|
+
# Print the 10 slowest examples and example groups at the
|
95
|
+
# end of the spec run, to help surface which specs are running
|
96
|
+
# particularly slow.
|
97
|
+
config.profile_examples = 10
|
98
|
+
|
99
|
+
# Run specs in random order to surface order dependencies. If you find an
|
100
|
+
# order dependency and want to debug it, you can fix the order by providing
|
101
|
+
# the seed, which is printed after each run.
|
102
|
+
# --seed 1234
|
103
|
+
config.order = :random
|
104
|
+
|
105
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
106
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
107
|
+
# test failures related to randomization by passing the same `--seed` value
|
108
|
+
# as the one that triggered the failure.
|
109
|
+
Kernel.srand config.seed
|
110
|
+
=end
|
111
|
+
end
|
data/test.rb
ADDED
@@ -0,0 +1,139 @@
|
|
1
|
+
require 'finnhub_ruby'
|
2
|
+
|
3
|
+
FinnhubRuby.configure do |config|
|
4
|
+
config.api_key['token'] = 'YOUR API KEY'
|
5
|
+
end
|
6
|
+
|
7
|
+
finnhub_client = FinnhubRuby::DefaultApi.new
|
8
|
+
|
9
|
+
# Stock candles
|
10
|
+
puts(finnhub_client.stock_candles('AAPL', 'D', 1590988249, 1591852249))
|
11
|
+
|
12
|
+
# Aggregate Indicators
|
13
|
+
puts(finnhub_client.aggregate_indicator('AAPL', 'D'))
|
14
|
+
|
15
|
+
# Basic financials
|
16
|
+
puts(finnhub_client.company_basic_financials('AAPL', 'margin'))
|
17
|
+
|
18
|
+
# Earnings surprises
|
19
|
+
puts(finnhub_client.company_earnings('TSLA', {limit: 5}))
|
20
|
+
|
21
|
+
# EPS estimates
|
22
|
+
puts(finnhub_client.company_eps_estimates('AMZN', {freq: 'quarterly'}))
|
23
|
+
|
24
|
+
# Company Executives
|
25
|
+
puts(finnhub_client.company_executive('AAPL'))
|
26
|
+
|
27
|
+
# Company News
|
28
|
+
# Need to use _from instead of from to avoid conflict
|
29
|
+
puts(finnhub_client.company_news('AAPL', "2020-06-01", "2020-06-10"))
|
30
|
+
|
31
|
+
# Company Peers
|
32
|
+
puts(finnhub_client.company_peers('AAPL'))
|
33
|
+
|
34
|
+
# Company Profile
|
35
|
+
puts(finnhub_client.company_profile({symbol: 'AAPL'}))
|
36
|
+
puts(finnhub_client.company_profile({isin: 'US0378331005'}))
|
37
|
+
puts(finnhub_client.company_profile({cusip: '037833100'}))
|
38
|
+
|
39
|
+
# Company Profile 2
|
40
|
+
puts(finnhub_client.company_profile2({symbol: 'AAPL'}))
|
41
|
+
|
42
|
+
# Revenue Estimates
|
43
|
+
puts(finnhub_client.company_revenue_estimates('TSLA', {freq: 'quarterly'}))
|
44
|
+
|
45
|
+
# List country
|
46
|
+
puts(finnhub_client.country())
|
47
|
+
|
48
|
+
# Crypto Exchange
|
49
|
+
puts(finnhub_client.crypto_exchanges())
|
50
|
+
|
51
|
+
# Crypto symbols
|
52
|
+
puts(finnhub_client.crypto_symbols('BINANCE'))
|
53
|
+
|
54
|
+
# Economic data
|
55
|
+
puts(finnhub_client.economic_data('MA-USA-656880'))
|
56
|
+
|
57
|
+
# Filings
|
58
|
+
puts(finnhub_client.filings({symbol: 'AAPL', from: "2020-01-01", to: "2020-06-11"}))
|
59
|
+
|
60
|
+
# Financials
|
61
|
+
puts(finnhub_client.financials('AAPL', 'bs', 'annual'))
|
62
|
+
|
63
|
+
# Financials as reported
|
64
|
+
puts(finnhub_client.financials_reported({symbol: 'AAPL', freq: 'annual'}))
|
65
|
+
|
66
|
+
# Forex exchanges
|
67
|
+
puts(finnhub_client.forex_exchanges())
|
68
|
+
|
69
|
+
# Forex all pairs
|
70
|
+
puts(finnhub_client.forex_rates({base: 'USD'}))
|
71
|
+
|
72
|
+
# Forex symbols
|
73
|
+
puts(finnhub_client.forex_symbols('OANDA'))
|
74
|
+
|
75
|
+
# Fund Ownership
|
76
|
+
puts(finnhub_client.fund_ownership('AMZN', {limit: 5}))
|
77
|
+
|
78
|
+
# General news
|
79
|
+
puts(finnhub_client.general_news('forex', {min_id: 0}))
|
80
|
+
|
81
|
+
# Investors ownership
|
82
|
+
puts(finnhub_client.investors_ownership('AAPL', {limit: 5}))
|
83
|
+
|
84
|
+
# IPO calendar
|
85
|
+
puts(finnhub_client.ipo_calendar("2020-05-01", "2020-06-01"))
|
86
|
+
|
87
|
+
# Major developments
|
88
|
+
puts(finnhub_client.major_developments('AAPL', {from: "2020-01-01", to: "2020-12-31"}))
|
89
|
+
|
90
|
+
# News sentiment
|
91
|
+
puts(finnhub_client.news_sentiment('AAPL'))
|
92
|
+
|
93
|
+
# Pattern recognition
|
94
|
+
puts(finnhub_client.pattern_recognition('AAPL', 'D'))
|
95
|
+
|
96
|
+
# Price target
|
97
|
+
puts(finnhub_client.price_target('AAPL'))
|
98
|
+
|
99
|
+
# Quote
|
100
|
+
puts(finnhub_client.quote('AAPL'))
|
101
|
+
|
102
|
+
# Recommendation trends
|
103
|
+
puts(finnhub_client.recommendation_trends('AAPL'))
|
104
|
+
|
105
|
+
# Stock dividends
|
106
|
+
puts(finnhub_client.stock_dividends('KO', '2019-01-01', '2020-01-01'))
|
107
|
+
|
108
|
+
# Transcripts
|
109
|
+
puts(finnhub_client.transcripts('AAPL_162777'))
|
110
|
+
|
111
|
+
# Transcripts list
|
112
|
+
puts(finnhub_client.transcripts_list('AAPL'))
|
113
|
+
|
114
|
+
# Earnings Calendar
|
115
|
+
puts(finnhub_client.earnings_calendar({from: "2020-06-10", to: "2020-06-30", symbol: "", international: false}))
|
116
|
+
|
117
|
+
# Covid-19
|
118
|
+
puts(finnhub_client.covid19())
|
119
|
+
|
120
|
+
# Upgrade downgrade
|
121
|
+
puts(finnhub_client.upgrade_downgrade({symbol: 'AAPL', from: '2020-01-01', to: '2020-06-30'}))
|
122
|
+
|
123
|
+
# Support resistance
|
124
|
+
puts(finnhub_client.support_resistance('AAPL', 'D'))
|
125
|
+
|
126
|
+
# Stock splits
|
127
|
+
puts(finnhub_client.stock_splits('AAPL', '2000-01-01', '2020-01-01'))
|
128
|
+
|
129
|
+
# Forex candles
|
130
|
+
puts(finnhub_client.forex_candles('OANDA:EUR_USD', 'D', 1590988249, 1591852249))
|
131
|
+
|
132
|
+
# Crypto Candles
|
133
|
+
puts(finnhub_client.crypto_candles('BINANCE:BTCUSDT', 'D', 1590988249, 1591852249))
|
134
|
+
|
135
|
+
# Tick Data
|
136
|
+
puts(finnhub_client.stock_tick_with_http_info('AAPL', '2020-03-25', 500, 0))
|
137
|
+
|
138
|
+
# Technical Indicator
|
139
|
+
puts(finnhub_client.technical_indicator("AAPL", 'D', 1583098857, 1584308457, 'rsi', {"timeperiod": 3}))
|