lib/iex/endpoints/ref_data.rb in iex-ruby-client-1.1.2 vs lib/iex/endpoints/ref_data.rb in iex-ruby-client-1.2.0
- old
+ new
@@ -1,17 +1,22 @@
module IEX
module Endpoints
module RefData
def ref_data_isin(isins, options = {})
- response = post('ref-data/isin', { token: publishable_token, isin: isins }.merge(options))
+ response = get('ref-data/isin', { token: publishable_token, isin: isins.join(',') }.merge(options))
if response.is_a?(Hash) # mapped option was set
response.transform_values do |rows|
rows&.map { |row| IEX::Resources::Symbol.new(row) }
end
else
response.map { |row| IEX::Resources::Symbol.new(row) }
end
+ end
+
+ def ref_data_symbols(options = {})
+ response = get('ref-data/symbols', { token: publishable_token }.merge(options))
+ response.map { |row| IEX::Resources::Symbols.new(row) }
end
end
end
end