ya_finance 0.0.6 → 0.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 350153b998a6e8aacebd322cbf947983eccc739a12d224162f74677a2732afdc
4
- data.tar.gz: 0cbbc80461de64854bf280cef1c23d9cd007ca6867a3c84475aa9cae0a0c443f
3
+ metadata.gz: b73fa256f3498983fca798a02080a9570de91b6877dc327faddf767f75322b5a
4
+ data.tar.gz: ad8dd021e3db96db4590aa8ee0b342ab0f781b2a5c7a53da3df5dc581fc101b7
5
5
  SHA512:
6
- metadata.gz: e0558a4765e4ea1e22dabc33c1d3562118acffea16750dc8f189e8861ad7a7aa44f2382163e365d6c15b38ad3a509fe74908fc5e8145d7ba22cff7c68740764f
7
- data.tar.gz: bc1abec6d6dfb1d2f3bc9cbb4c7782cedb0add7099b25c1186e3e9727437a00f4795ea93cbee27e7710bf0eaea11ad0816ffc41481546cbb2ebddf8e33d48831
6
+ metadata.gz: 780db127ff32f8d4b4423b23e471efd059c87d01e72b01a0c2e739083da727ee7a1474fa82d8550f82c47450698400d4caae22c9c319df8fbc95718c61fc3a26
7
+ data.tar.gz: 7f0b3ce6c804e09105044fb50bd74773aa86420ed786b8471c3d91bff357fdab52403cdc399d3eced516766946e3f024108b7982c20f54fba39f6c1c43e62b9a
@@ -5,7 +5,7 @@ class YaFinance
5
5
  include Http::FetchV6
6
6
  include Http::FetchRoot
7
7
 
8
- def initialize(ticker, options)
8
+ def initialize(ticker, options={})
9
9
  @ticker = ticker
10
10
  @options = options
11
11
  end
@@ -19,16 +19,24 @@ class YaFinance
19
19
  fetch_v6('price')['price']['shortName']
20
20
  end
21
21
 
22
- def shares
23
- # ...
22
+ def statistics
23
+ fetch_v6('defaultKeyStatistics')['defaultKeyStatistics']
24
24
  end
25
25
 
26
- def info
27
- # ...
26
+ def financial
27
+ fetch_v6('financialData')['financialData']
28
28
  end
29
29
 
30
- def sustainability
31
- # ...
30
+ def summary
31
+ fetch_v6('summaryDetail')['summaryDetail']
32
+ end
33
+
34
+ def profile
35
+ fetch_v6('assetProfile')['assetProfile']
36
+ end
37
+
38
+ def quote_type
39
+ fetch_v6('quoteType')['quoteType']
32
40
  end
33
41
  end
34
42
  end
@@ -32,7 +32,7 @@ class YaFinance::Past
32
32
  end
33
33
 
34
34
  def capital_gains
35
- evs = fetch_v8("chart/#{@ticker}?events=capitalGains#{OPTIONS}")['chart']['result'][0]['events']
35
+ # evs = fetch_v8("chart/#{@ticker}?events=capitalGains#{OPTIONS}")['chart']['result'][0]['events']
36
36
  end
37
37
 
38
38
  def actions
data/lib/ya_finance.rb CHANGED
@@ -8,7 +8,7 @@ require "csv"
8
8
  require 'bigdecimal'
9
9
 
10
10
  class YaFinance
11
- VERSION = "0.0.6"
11
+ VERSION = "0.0.7"
12
12
 
13
13
  def initialize(ticker, options={})
14
14
  @ticker = ticker
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ya_finance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Fonseca Engel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-11 00:00:00.000000000 Z
11
+ date: 2023-08-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Financial Information consumer with CLI working in 2023 - reads from
14
14
  Yahoo Finances