Class: Intrinio::DataPointApi

Inherits:
Object
  • Object
show all
Defined in:
lib/intrinio-sdk/api/data_point_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DataPointApi

Returns a new instance of DataPointApi.



19
20
21
# File 'lib/intrinio-sdk/api/data_point_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/intrinio-sdk/api/data_point_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_data_point_number(identifier, tag, opts = {}) ⇒ Float

Data Point (Number) Returns a numeric value for the given ‘tag` and the entity with the given `identifier`

Parameters:

  • identifier

    An identifier for an entity such as a Company, Security, Index, etc (Ticker, FIGI, ISIN, CUSIP, CIK, LEI, Intrinio ID)

  • tag

    An Intrinio data tag ID or code (<a href='data.intrinio.com/data-tags'>reference</a>)

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Float)


29
30
31
32
# File 'lib/intrinio-sdk/api/data_point_api.rb', line 29

def get_data_point_number(identifier, tag, opts = {})
  data, _status_code, _headers = get_data_point_number_with_http_info(identifier, tag, opts)
  return data
end

#get_data_point_number_with_http_info(identifier, tag, opts = {}) ⇒ Array<(Float, Fixnum, Hash)>

Data Point (Number) Returns a numeric value for the given &#x60;tag&#x60; and the entity with the given &#x60;identifier&#x60;

Parameters:

  • identifier

    An identifier for an entity such as a Company, Security, Index, etc (Ticker, FIGI, ISIN, CUSIP, CIK, LEI, Intrinio ID)

  • tag

    An Intrinio data tag ID or code (&lt;a href&#x3D;&#39;data.intrinio.com/data-tags&#39;&gt;reference&lt;/a&gt;)

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Float, Fixnum, Hash)>)

    Float data, response status code and response headers



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/intrinio-sdk/api/data_point_api.rb', line 40

def get_data_point_number_with_http_info(identifier, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DataPointApi.get_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 DataPointApi.get_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 DataPointApi.get_data_point_number"
  end
  # resource path
  local_var_path = "/data_point/{identifier}/{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: DataPointApi#get_data_point_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_data_point_text(identifier, tag, opts = {}) ⇒ String

Data Point (Text) Returns a text value for the given ‘tag` for the Security with the given `identifier`

Parameters:

  • identifier

    An identifier for an entity such as a Company, Security, Index, etc (Ticker, FIGI, ISIN, CUSIP, CIK, LEI, Intrinio ID)

  • tag

    An Intrinio data tag ID or code (&lt;a href&#x3D;&#39;data.intrinio.com/data-tags&#39;&gt;reference&lt;/a&gt;)

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


88
89
90
91
# File 'lib/intrinio-sdk/api/data_point_api.rb', line 88

def get_data_point_text(identifier, tag, opts = {})
  data, _status_code, _headers = get_data_point_text_with_http_info(identifier, tag, opts)
  return data
end

#get_data_point_text_with_http_info(identifier, tag, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Data Point (Text) Returns a text value for the given &#x60;tag&#x60; for the Security with the given &#x60;identifier&#x60;

Parameters:

  • identifier

    An identifier for an entity such as a Company, Security, Index, etc (Ticker, FIGI, ISIN, CUSIP, CIK, LEI, Intrinio ID)

  • tag

    An Intrinio data tag ID or code (&lt;a href&#x3D;&#39;data.intrinio.com/data-tags&#39;&gt;reference&lt;/a&gt;)

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/intrinio-sdk/api/data_point_api.rb', line 99

def get_data_point_text_with_http_info(identifier, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: DataPointApi.get_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 DataPointApi.get_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 DataPointApi.get_data_point_text"
  end
  # resource path
  local_var_path = "/data_point/{identifier}/{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: DataPointApi#get_data_point_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end