class Intrinio::IndexApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/intrinio-sdk/api/index_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

get_all_economic_indices(opts = {}) click to toggle source

All Economic Indices

@param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of results to return (default to 100) @option opts [String] :next_page Gets the next page of data from a previous API call @return [ApiResponseEconomicIndices]

# File lib/intrinio-sdk/api/index_api.rb, line 29
def get_all_economic_indices(opts = {})
  data, _status_code, _headers = get_all_economic_indices_with_http_info(opts)
  return data
end
get_all_economic_indices_with_http_info(opts = {}) click to toggle source

All Economic Indices

@param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of results to return @option opts [String] :next_page Gets the next page of data from a previous API call @return [Array<(ApiResponseEconomicIndices, Fixnum, Hash)>] ApiResponseEconomicIndices data, response status code and response headers

# File lib/intrinio-sdk/api/index_api.rb, line 40
def get_all_economic_indices_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IndexApi.get_all_economic_indices ..."
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_all_economic_indices, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/indices/economic"

  # query parameters
  query_params = {}
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseEconomicIndices')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IndexApi#get_all_economic_indices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_all_sic_indices(opts = {}) click to toggle source

All SIC Indices

@param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of results to return (default to 100) @option opts [String] :next_page Gets the next page of data from a previous API call @return [ApiResponseSICIndices]

# File lib/intrinio-sdk/api/index_api.rb, line 86
def get_all_sic_indices(opts = {})
  data, _status_code, _headers = get_all_sic_indices_with_http_info(opts)
  return data
end
get_all_sic_indices_with_http_info(opts = {}) click to toggle source

All SIC Indices

@param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of results to return @option opts [String] :next_page Gets the next page of data from a previous API call @return [Array<(ApiResponseSICIndices, Fixnum, Hash)>] ApiResponseSICIndices data, response status code and response headers

# File lib/intrinio-sdk/api/index_api.rb, line 97
def get_all_sic_indices_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IndexApi.get_all_sic_indices ..."
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_all_sic_indices, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/indices/sic"

  # query parameters
  query_params = {}
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseSICIndices')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IndexApi#get_all_sic_indices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_all_stock_market_indices(opts = {}) click to toggle source

All Stock Market Indices

@param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of results to return (default to 100) @option opts [String] :next_page Gets the next page of data from a previous API call @return [ApiResponseStockMarketIndices]

# File lib/intrinio-sdk/api/index_api.rb, line 143
def get_all_stock_market_indices(opts = {})
  data, _status_code, _headers = get_all_stock_market_indices_with_http_info(opts)
  return data
end
get_all_stock_market_indices_with_http_info(opts = {}) click to toggle source

All Stock Market Indices

@param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of results to return @option opts [String] :next_page Gets the next page of data from a previous API call @return [Array<(ApiResponseStockMarketIndices, Fixnum, Hash)>] ApiResponseStockMarketIndices data, response status code and response headers

# File lib/intrinio-sdk/api/index_api.rb, line 154
def get_all_stock_market_indices_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IndexApi.get_all_stock_market_indices ..."
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_all_stock_market_indices, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/indices/stock_market"

  # query parameters
  query_params = {}
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseStockMarketIndices')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IndexApi#get_all_stock_market_indices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_economic_index_by_id(identifier, opts = {}) click to toggle source

Lookup Economic Index

@param identifier An Index Identifier (symbol, Intrinio ID) @param [Hash] opts the optional parameters @return [EconomicIndex]

# File lib/intrinio-sdk/api/index_api.rb, line 199
def get_economic_index_by_id(identifier, opts = {})
  data, _status_code, _headers = get_economic_index_by_id_with_http_info(identifier, opts)
  return data
end
get_economic_index_by_id_with_http_info(identifier, opts = {}) click to toggle source

Lookup Economic Index

@param identifier An Index Identifier (symbol, Intrinio ID) @param [Hash] opts the optional parameters @return [Array<(EconomicIndex, Fixnum, Hash)>] EconomicIndex data, response status code and response headers

# File lib/intrinio-sdk/api/index_api.rb, line 209
def get_economic_index_by_id_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IndexApi.get_economic_index_by_id ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_economic_index_by_id"
  end
  # resource path
  local_var_path = "/indices/economic/{identifier}".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EconomicIndex')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IndexApi#get_economic_index_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_economic_index_data_point_number(identifier, tag, opts = {}) click to toggle source

Data Point (Number) for an Economic Index Returns a numeric value for the given `tag` for the Economic Index with the given `identifier` @param identifier An Index Identifier (symbol, Intrinio ID) @param tag An Intrinio data tag &lt;a href&#x3D;&#39;data.intrinio.com/data-tags/economic'>reference</a>; @param [Hash] opts the optional parameters @return [Float]

# File lib/intrinio-sdk/api/index_api.rb, line 253
def get_economic_index_data_point_number(identifier, tag, opts = {})
  data, _status_code, _headers = get_economic_index_data_point_number_with_http_info(identifier, tag, opts)
  return data
end
get_economic_index_data_point_number_with_http_info(identifier, tag, opts = {}) click to toggle source

Data Point (Number) for an Economic Index Returns a numeric value for the given &#x60;tag&#x60; for the Economic Index with the given &#x60;identifier&#x60; @param identifier An Index Identifier (symbol, Intrinio ID) @param tag An Intrinio data tag &lt;a href&#x3D;&#39;data.intrinio.com/data-tags/economic'>reference</a>; @param [Hash] opts the optional parameters @return [Array<(Float, Fixnum, Hash)>] Float data, response status code and response headers

# File lib/intrinio-sdk/api/index_api.rb, line 264
def get_economic_index_data_point_number_with_http_info(identifier, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IndexApi.get_economic_index_data_point_number ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_economic_index_data_point_number"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling IndexApi.get_economic_index_data_point_number"
  end
  # resource path
  local_var_path = "/indices/economic/{identifier}/data_point/{tag}/number".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Float')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IndexApi#get_economic_index_data_point_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_economic_index_data_point_text(identifier, tag, opts = {}) click to toggle source

Data Point (Text) for an Economic Index Returns a text value for the given `tag` for the Economic Index with the given `identifier` @param identifier An Index Identifier (symbol, Intrinio ID) @param tag An Intrinio data tag ID or code-name @param [Hash] opts the optional parameters @return [String]

# File lib/intrinio-sdk/api/index_api.rb, line 312
def get_economic_index_data_point_text(identifier, tag, opts = {})
  data, _status_code, _headers = get_economic_index_data_point_text_with_http_info(identifier, tag, opts)
  return data
end
get_economic_index_data_point_text_with_http_info(identifier, tag, opts = {}) click to toggle source

Data Point (Text) for an Economic Index Returns a text value for the given &#x60;tag&#x60; for the Economic Index with the given &#x60;identifier&#x60; @param identifier An Index Identifier (symbol, Intrinio ID) @param tag An Intrinio data tag ID or code-name @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/intrinio-sdk/api/index_api.rb, line 323
def get_economic_index_data_point_text_with_http_info(identifier, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IndexApi.get_economic_index_data_point_text ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_economic_index_data_point_text"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling IndexApi.get_economic_index_data_point_text"
  end
  # resource path
  local_var_path = "/indices/economic/{identifier}/data_point/{tag}/text".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IndexApi#get_economic_index_data_point_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_economic_index_historical_data(identifier, tag, opts = {}) click to toggle source

Historical Data for an Economic Index Returns historical values for the given `tag` and the Economic Index with the given `identifier` @param identifier An Index Identifier (symbol, Intrinio ID) @param tag An Intrinio data tag &lt;a href&#x3D;&#39;data.intrinio.com/data-tags/economic'>reference</a>; @param [Hash] opts the optional parameters @option opts [String] :type Filter by type, when applicable @option opts [Date] :start_date Get historical data on or after this date @option opts [Date] :end_date Get historical data on or before this date @option opts [String] :sort_order Sort by date &#x60;asc&#x60; or &#x60;desc&#x60; (default to desc) @option opts [Integer] :page_size The number of results to return (default to 100) @option opts [String] :next_page Gets the next page of data from a previous API call @return [ApiResponseEconomicIndexHistoricalData]

# File lib/intrinio-sdk/api/index_api.rb, line 377
def get_economic_index_historical_data(identifier, tag, opts = {})
  data, _status_code, _headers = get_economic_index_historical_data_with_http_info(identifier, tag, opts)
  return data
end
get_economic_index_historical_data_with_http_info(identifier, tag, opts = {}) click to toggle source

Historical Data for an Economic Index Returns historical values for the given &#x60;tag&#x60; and the Economic Index with the given &#x60;identifier&#x60; @param identifier An Index Identifier (symbol, Intrinio ID) @param tag An Intrinio data tag &lt;a href&#x3D;&#39;data.intrinio.com/data-tags/economic'>reference</a>; @param [Hash] opts the optional parameters @option opts [String] :type Filter by type, when applicable @option opts [Date] :start_date Get historical data on or after this date @option opts [Date] :end_date Get historical data on or before this date @option opts [String] :sort_order Sort by date &#x60;asc&#x60; or &#x60;desc&#x60; @option opts [Integer] :page_size The number of results to return @option opts [String] :next_page Gets the next page of data from a previous API call @return [Array<(ApiResponseEconomicIndexHistoricalData, Fixnum, Hash)>] ApiResponseEconomicIndexHistoricalData data, response status code and response headers

# File lib/intrinio-sdk/api/index_api.rb, line 394
def get_economic_index_historical_data_with_http_info(identifier, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IndexApi.get_economic_index_historical_data ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_economic_index_historical_data"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling IndexApi.get_economic_index_historical_data"
  end
  if @api_client.config.client_side_validation && opts[:'sort_order'] && !['asc', 'desc'].include?(opts[:'sort_order'])
    fail ArgumentError, 'invalid value for "sort_order", must be one of asc, desc'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_economic_index_historical_data, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/indices/economic/{identifier}/historical_data/{tag}".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseEconomicIndexHistoricalData')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IndexApi#get_economic_index_historical_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_sic_index_by_id(identifier, opts = {}) click to toggle source

Lookup SIC Index

@param identifier An Index Identifier (symbol, Intrinio ID) @param [Hash] opts the optional parameters @return [SICIndex]

# File lib/intrinio-sdk/api/index_api.rb, line 454
def get_sic_index_by_id(identifier, opts = {})
  data, _status_code, _headers = get_sic_index_by_id_with_http_info(identifier, opts)
  return data
end
get_sic_index_by_id_with_http_info(identifier, opts = {}) click to toggle source

Lookup SIC Index

@param identifier An Index Identifier (symbol, Intrinio ID) @param [Hash] opts the optional parameters @return [Array<(SICIndex, Fixnum, Hash)>] SICIndex data, response status code and response headers

# File lib/intrinio-sdk/api/index_api.rb, line 464
def get_sic_index_by_id_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IndexApi.get_sic_index_by_id ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_sic_index_by_id"
  end
  # resource path
  local_var_path = "/indices/sic/{identifier}".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SICIndex')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IndexApi#get_sic_index_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_sic_index_data_point_number(identifier, tag, opts = {}) click to toggle source

Data Point (Number) for an SIC Index Returns a numeric value for the given `tag` for the SIC Index with the given `identifier` @param identifier An Index Identifier (symbol, Intrinio ID) @param tag An Intrinio data tag ID or code-name @param [Hash] opts the optional parameters @return [Float]

# File lib/intrinio-sdk/api/index_api.rb, line 508
def get_sic_index_data_point_number(identifier, tag, opts = {})
  data, _status_code, _headers = get_sic_index_data_point_number_with_http_info(identifier, tag, opts)
  return data
end
get_sic_index_data_point_number_with_http_info(identifier, tag, opts = {}) click to toggle source

Data Point (Number) for an SIC Index Returns a numeric value for the given &#x60;tag&#x60; for the SIC Index with the given &#x60;identifier&#x60; @param identifier An Index Identifier (symbol, Intrinio ID) @param tag An Intrinio data tag ID or code-name @param [Hash] opts the optional parameters @return [Array<(Float, Fixnum, Hash)>] Float data, response status code and response headers

# File lib/intrinio-sdk/api/index_api.rb, line 519
def get_sic_index_data_point_number_with_http_info(identifier, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IndexApi.get_sic_index_data_point_number ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_sic_index_data_point_number"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling IndexApi.get_sic_index_data_point_number"
  end
  # resource path
  local_var_path = "/indices/sic/{identifier}/data_point/{tag}/number".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Float')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IndexApi#get_sic_index_data_point_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_sic_index_data_point_text(identifier, tag, opts = {}) click to toggle source

Data Point (Text) for an SIC Index Returns a text value for the given `tag` for the SIC Index with the given `identifier` @param identifier An Index Identifier (symbol, Intrinio ID) @param tag An Intrinio data tag ID or code-name @param [Hash] opts the optional parameters @return [String]

# File lib/intrinio-sdk/api/index_api.rb, line 567
def get_sic_index_data_point_text(identifier, tag, opts = {})
  data, _status_code, _headers = get_sic_index_data_point_text_with_http_info(identifier, tag, opts)
  return data
end
get_sic_index_data_point_text_with_http_info(identifier, tag, opts = {}) click to toggle source

Data Point (Text) for an SIC Index Returns a text value for the given &#x60;tag&#x60; for the SIC Index with the given &#x60;identifier&#x60; @param identifier An Index Identifier (symbol, Intrinio ID) @param tag An Intrinio data tag ID or code-name @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/intrinio-sdk/api/index_api.rb, line 578
def get_sic_index_data_point_text_with_http_info(identifier, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IndexApi.get_sic_index_data_point_text ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_sic_index_data_point_text"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling IndexApi.get_sic_index_data_point_text"
  end
  # resource path
  local_var_path = "/indices/sic/{identifier}/data_point/{tag}/text".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IndexApi#get_sic_index_data_point_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_sic_index_historical_data(identifier, tag, opts = {}) click to toggle source

Historical Data for an SIC Index Returns historical values for the given `tag` and the SIC Index with the given `identifier` @param identifier An Index Identifier (symbol, Intrinio ID) @param tag An Intrinio data tag ID or code-name @param [Hash] opts the optional parameters @option opts [String] :type Filter by type, when applicable @option opts [Date] :start_date Get historical data on or after this date @option opts [Date] :end_date Get historical data on or before this date @option opts [String] :sort_order Sort by date &#x60;asc&#x60; or &#x60;desc&#x60; (default to desc) @option opts [Integer] :page_size The number of results to return (default to 100) @option opts [String] :next_page Gets the next page of data from a previous API call @return [ApiResponseSICIndexHistoricalData]

# File lib/intrinio-sdk/api/index_api.rb, line 632
def get_sic_index_historical_data(identifier, tag, opts = {})
  data, _status_code, _headers = get_sic_index_historical_data_with_http_info(identifier, tag, opts)
  return data
end
get_sic_index_historical_data_with_http_info(identifier, tag, opts = {}) click to toggle source

Historical Data for an SIC Index Returns historical values for the given &#x60;tag&#x60; and the SIC Index with the given &#x60;identifier&#x60; @param identifier An Index Identifier (symbol, Intrinio ID) @param tag An Intrinio data tag ID or code-name @param [Hash] opts the optional parameters @option opts [String] :type Filter by type, when applicable @option opts [Date] :start_date Get historical data on or after this date @option opts [Date] :end_date Get historical data on or before this date @option opts [String] :sort_order Sort by date &#x60;asc&#x60; or &#x60;desc&#x60; @option opts [Integer] :page_size The number of results to return @option opts [String] :next_page Gets the next page of data from a previous API call @return [Array<(ApiResponseSICIndexHistoricalData, Fixnum, Hash)>] ApiResponseSICIndexHistoricalData data, response status code and response headers

# File lib/intrinio-sdk/api/index_api.rb, line 649
def get_sic_index_historical_data_with_http_info(identifier, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IndexApi.get_sic_index_historical_data ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_sic_index_historical_data"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling IndexApi.get_sic_index_historical_data"
  end
  if @api_client.config.client_side_validation && opts[:'sort_order'] && !['asc', 'desc'].include?(opts[:'sort_order'])
    fail ArgumentError, 'invalid value for "sort_order", must be one of asc, desc'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_sic_index_historical_data, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/indices/sic/{identifier}/historical_data/{tag}".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseSICIndexHistoricalData')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IndexApi#get_sic_index_historical_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_stock_market_index_by_id(identifier, opts = {}) click to toggle source

Lookup Stock Market Index

@param identifier An Index Identifier (symbol, Intrinio ID) @param [Hash] opts the optional parameters @return [StockMarketIndex]

# File lib/intrinio-sdk/api/index_api.rb, line 709
def get_stock_market_index_by_id(identifier, opts = {})
  data, _status_code, _headers = get_stock_market_index_by_id_with_http_info(identifier, opts)
  return data
end
get_stock_market_index_by_id_with_http_info(identifier, opts = {}) click to toggle source

Lookup Stock Market Index

@param identifier An Index Identifier (symbol, Intrinio ID) @param [Hash] opts the optional parameters @return [Array<(StockMarketIndex, Fixnum, Hash)>] StockMarketIndex data, response status code and response headers

# File lib/intrinio-sdk/api/index_api.rb, line 719
def get_stock_market_index_by_id_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IndexApi.get_stock_market_index_by_id ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_stock_market_index_by_id"
  end
  # resource path
  local_var_path = "/indices/stock_market/{identifier}".sub('{' + 'identifier' + '}', identifier.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'StockMarketIndex')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IndexApi#get_stock_market_index_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_stock_market_index_data_point_number(identifier, tag, opts = {}) click to toggle source

Data Point (Number) for Stock Market Index Returns a numeric value for the given `tag` for the Stock Market Index with the given `identifier` @param identifier An Index Identifier (symbol, Intrinio ID) @param tag An Intrinio data tag ID or code-name @param [Hash] opts the optional parameters @return [Float]

# File lib/intrinio-sdk/api/index_api.rb, line 763
def get_stock_market_index_data_point_number(identifier, tag, opts = {})
  data, _status_code, _headers = get_stock_market_index_data_point_number_with_http_info(identifier, tag, opts)
  return data
end
get_stock_market_index_data_point_number_with_http_info(identifier, tag, opts = {}) click to toggle source

Data Point (Number) for Stock Market Index Returns a numeric value for the given &#x60;tag&#x60; for the Stock Market Index with the given &#x60;identifier&#x60; @param identifier An Index Identifier (symbol, Intrinio ID) @param tag An Intrinio data tag ID or code-name @param [Hash] opts the optional parameters @return [Array<(Float, Fixnum, Hash)>] Float data, response status code and response headers

# File lib/intrinio-sdk/api/index_api.rb, line 774
def get_stock_market_index_data_point_number_with_http_info(identifier, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IndexApi.get_stock_market_index_data_point_number ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_stock_market_index_data_point_number"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling IndexApi.get_stock_market_index_data_point_number"
  end
  # resource path
  local_var_path = "/indices/stock_market/{identifier}/data_point/{tag}/number".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Float')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IndexApi#get_stock_market_index_data_point_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_stock_market_index_data_point_text(identifier, tag, opts = {}) click to toggle source

Data Point (Text) for Stock Market Index Returns a text value for the given `tag` for the Stock Market Index with the given `identifier` @param identifier An Index Identifier (symbol, Intrinio ID) @param tag An Intrinio data tag ID or code-name @param [Hash] opts the optional parameters @return [String]

# File lib/intrinio-sdk/api/index_api.rb, line 822
def get_stock_market_index_data_point_text(identifier, tag, opts = {})
  data, _status_code, _headers = get_stock_market_index_data_point_text_with_http_info(identifier, tag, opts)
  return data
end
get_stock_market_index_data_point_text_with_http_info(identifier, tag, opts = {}) click to toggle source

Data Point (Text) for Stock Market Index Returns a text value for the given &#x60;tag&#x60; for the Stock Market Index with the given &#x60;identifier&#x60; @param identifier An Index Identifier (symbol, Intrinio ID) @param tag An Intrinio data tag ID or code-name @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/intrinio-sdk/api/index_api.rb, line 833
def get_stock_market_index_data_point_text_with_http_info(identifier, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IndexApi.get_stock_market_index_data_point_text ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_stock_market_index_data_point_text"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling IndexApi.get_stock_market_index_data_point_text"
  end
  # resource path
  local_var_path = "/indices/stock_market/{identifier}/data_point/{tag}/text".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain; charset=utf-8'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IndexApi#get_stock_market_index_data_point_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_stock_market_index_historical_data(identifier, tag, opts = {}) click to toggle source

Historical Data for Stock Market Index Returns historical values for the given `tag` and the Stock Market Index with the given `identifier` @param identifier An Index Identifier (symbol, Intrinio ID) @param tag An Intrinio data tag ID or code-name @param [Hash] opts the optional parameters @option opts [String] :type Filter by type, when applicable @option opts [Date] :start_date Get historical data on or after this date @option opts [Date] :end_date Get historical data on or before this date @option opts [String] :sort_order Sort by date &#x60;asc&#x60; or &#x60;desc&#x60; (default to desc) @option opts [Integer] :page_size The number of results to return (default to 100) @option opts [String] :next_page Gets the next page of data from a previous API call @return [ApiResponseStockMarketIndexHistoricalData]

# File lib/intrinio-sdk/api/index_api.rb, line 887
def get_stock_market_index_historical_data(identifier, tag, opts = {})
  data, _status_code, _headers = get_stock_market_index_historical_data_with_http_info(identifier, tag, opts)
  return data
end
get_stock_market_index_historical_data_with_http_info(identifier, tag, opts = {}) click to toggle source

Historical Data for Stock Market Index Returns historical values for the given &#x60;tag&#x60; and the Stock Market Index with the given &#x60;identifier&#x60; @param identifier An Index Identifier (symbol, Intrinio ID) @param tag An Intrinio data tag ID or code-name @param [Hash] opts the optional parameters @option opts [String] :type Filter by type, when applicable @option opts [Date] :start_date Get historical data on or after this date @option opts [Date] :end_date Get historical data on or before this date @option opts [String] :sort_order Sort by date &#x60;asc&#x60; or &#x60;desc&#x60; @option opts [Integer] :page_size The number of results to return @option opts [String] :next_page Gets the next page of data from a previous API call @return [Array<(ApiResponseStockMarketIndexHistoricalData, Fixnum, Hash)>] ApiResponseStockMarketIndexHistoricalData data, response status code and response headers

# File lib/intrinio-sdk/api/index_api.rb, line 904
def get_stock_market_index_historical_data_with_http_info(identifier, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IndexApi.get_stock_market_index_historical_data ..."
  end
  # verify the required parameter 'identifier' is set
  if @api_client.config.client_side_validation && identifier.nil?
    fail ArgumentError, "Missing the required parameter 'identifier' when calling IndexApi.get_stock_market_index_historical_data"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling IndexApi.get_stock_market_index_historical_data"
  end
  if @api_client.config.client_side_validation && opts[:'sort_order'] && !['asc', 'desc'].include?(opts[:'sort_order'])
    fail ArgumentError, 'invalid value for "sort_order", must be one of asc, desc'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.get_stock_market_index_historical_data, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/indices/stock_market/{identifier}/historical_data/{tag}".sub('{' + 'identifier' + '}', identifier.to_s).sub('{' + 'tag' + '}', tag.to_s)

  # query parameters
  query_params = {}
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
  query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
  query_params[:'sort_order'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'next_page'] = opts[:'next_page'] if !opts[:'next_page'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseStockMarketIndexHistoricalData')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IndexApi#get_stock_market_index_historical_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
search_economic_indices(query, opts = {}) click to toggle source

Search Economic Indices Searches for indices using the text in `query` @param query Search query @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of results to return (default to 100) @return [ApiResponseEconomicIndicesSearch]

# File lib/intrinio-sdk/api/index_api.rb, line 965
def search_economic_indices(query, opts = {})
  data, _status_code, _headers = search_economic_indices_with_http_info(query, opts)
  return data
end
search_economic_indices_with_http_info(query, opts = {}) click to toggle source

Search Economic Indices Searches for indices using the text in &#x60;query&#x60; @param query Search query @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of results to return @return [Array<(ApiResponseEconomicIndicesSearch, Fixnum, Hash)>] ApiResponseEconomicIndicesSearch data, response status code and response headers

# File lib/intrinio-sdk/api/index_api.rb, line 976
def search_economic_indices_with_http_info(query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IndexApi.search_economic_indices ..."
  end
  # verify the required parameter 'query' is set
  if @api_client.config.client_side_validation && query.nil?
    fail ArgumentError, "Missing the required parameter 'query' when calling IndexApi.search_economic_indices"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.search_economic_indices, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/indices/economic/search"

  # query parameters
  query_params = {}
  query_params[:'query'] = query
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseEconomicIndicesSearch')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IndexApi#search_economic_indices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
search_sic_indices(query, opts = {}) click to toggle source

Search SIC Indices Searches for indices using the text in `query` @param query Search query @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of results to return (default to 100) @return [ApiResponseSICIndicesSearch]

# File lib/intrinio-sdk/api/index_api.rb, line 1026
def search_sic_indices(query, opts = {})
  data, _status_code, _headers = search_sic_indices_with_http_info(query, opts)
  return data
end
search_sic_indices_with_http_info(query, opts = {}) click to toggle source

Search SIC Indices Searches for indices using the text in &#x60;query&#x60; @param query Search query @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of results to return @return [Array<(ApiResponseSICIndicesSearch, Fixnum, Hash)>] ApiResponseSICIndicesSearch data, response status code and response headers

# File lib/intrinio-sdk/api/index_api.rb, line 1037
def search_sic_indices_with_http_info(query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IndexApi.search_sic_indices ..."
  end
  # verify the required parameter 'query' is set
  if @api_client.config.client_side_validation && query.nil?
    fail ArgumentError, "Missing the required parameter 'query' when calling IndexApi.search_sic_indices"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.search_sic_indices, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/indices/sic/search"

  # query parameters
  query_params = {}
  query_params[:'query'] = query
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseSICIndicesSearch')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IndexApi#search_sic_indices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
search_stock_markets_indices(query, opts = {}) click to toggle source

Search Stock Market Indices Searches for indices using the text in `query` @param query Search query @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of results to return (default to 100) @return [ApiResponseStockMarketIndicesSearch]

# File lib/intrinio-sdk/api/index_api.rb, line 1087
def search_stock_markets_indices(query, opts = {})
  data, _status_code, _headers = search_stock_markets_indices_with_http_info(query, opts)
  return data
end
search_stock_markets_indices_with_http_info(query, opts = {}) click to toggle source

Search Stock Market Indices Searches for indices using the text in &#x60;query&#x60; @param query Search query @param [Hash] opts the optional parameters @option opts [Integer] :page_size The number of results to return @return [Array<(ApiResponseStockMarketIndicesSearch, Fixnum, Hash)>] ApiResponseStockMarketIndicesSearch data, response status code and response headers

# File lib/intrinio-sdk/api/index_api.rb, line 1098
def search_stock_markets_indices_with_http_info(query, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IndexApi.search_stock_markets_indices ..."
  end
  # verify the required parameter 'query' is set
  if @api_client.config.client_side_validation && query.nil?
    fail ArgumentError, "Missing the required parameter 'query' when calling IndexApi.search_stock_markets_indices"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IndexApi.search_stock_markets_indices, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/indices/stock_market/search"

  # query parameters
  query_params = {}
  query_params[:'query'] = query
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['ApiKeyAuth']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ApiResponseStockMarketIndicesSearch')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IndexApi#search_stock_markets_indices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end