README.md in iex-ruby-client-0.4.2 vs README.md in iex-ruby-client-0.4.3

- old
+ new

@@ -8,11 +8,11 @@ # Table of Contents - [Installation](#installation) -- [Methods Available:](#methods-available) +- [Methods Available](#methods-available) - [Usage](#usage) - [Get a Single Price](#get-a-single-price) - [Get a Quote](#get-a-quote) - [Get a OHLC (Open, High, Low, Close) price](#get-a-ohlc-open-high-low-close-price) - [Get a market OHLC (Open, High, Low, Close) prices](#get-a-market-ohlc-open-high-low-close-prices) @@ -20,10 +20,11 @@ - [Get a Company Logo](#get-a-company-logo) - [Get Recent News](#get-recent-news) - [Get Chart](#get-chart) - [Get Key Stats](#get-key-stats) - [Get Dividends](#get-dividends) + - [Get Earnings](#get-earnings) - [Errors](#errors) - [SymbolNotFound](#symbolnotfound) - [ClientError](#clienterror) - [Contributing](#contributing) - [Copyright and License](#copyright-and-license) @@ -38,11 +39,11 @@ ``` Run `bundle install`. -## Methods Available: +## Methods Available - [Get a Single Price](#get-a-single-price) - [Get a Quote](#get-a-quote) - [Get a OHLC (Open, High, Low, Close) price](#get-a-ohlc-open-high-low-close-price) - [Get a Market OHLC (Open, High, Low, Close) prices](#get-a-market-ohlc-open-high-low-close-prices) @@ -50,10 +51,11 @@ - [Get Company Logo](#get-company-logo) - [Get Recent News](#get-recent-news) - [Get Chart](#get-chat) - [Get Key Stats](#get-key-stats) - [Get Dividends](#get-dividends) +- [Get Earnings](#get-earnings) ## Usage ### Get a Single Price @@ -272,9 +274,35 @@ dividends.type # 'Dividend income' dividends.qualified # 'Q' dividends.indicated # '' ``` See [#dividends](https://iextrading.com/developer/docs/#dividends) for detailed documentation or [dividends.rb](lib/iex/resources/dividends.rb) for returned fields. + + +### Get Earnings + +Fetches earnings for a symbol. + +```ruby +earnings = IEX::Resources::Earnings.get('MSFT') + +earnings.actual_eps # 1.13 +earnings.consensus_eps # 1.07 +earnings.estimated_eps # 1.07 +earnings.announce_time # 'AMC' +earnings.number_of_estimates # 14 +earnings.eps_surprise_dollar # 0.06 +earnings.eps_report_date # '2018-07-19' +earnings.fiscal_period # 'Q4 2018' +earnings.fiscal_end_date # '2018-06-30' +earnings.year_ago # 0.98 +earnings.year_ago_change_percent # 0.15306122448979584 +earnings.year_ago_change_percent_s # '+15.31%' +earnings.estimated_change_percent # 0.09183673469387764 +earnings.estimated_change_percent_s # '+9.18%' +earnings.symbol_id # 4563 +``` +See [#earnings](https://iextrading.com/developer/docs/#earnings) for detailed documentation or [earnings.rb](lib/iex/resources/earnings.rb) for returned fields. ## Errors ### SymbolNotFound