Class: Intrinio::DataPointApi
- Inherits:
-
Object
- Object
- Intrinio::DataPointApi
- Defined in:
- lib/intrinio-sdk/api/data_point_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_data_point_number(identifier, tag, opts = {}) ⇒ Float
Get a Data Point (Number) Returns a numeric value for the given ‘tag` and the entity with the given `identifier`.
-
#get_data_point_number_with_http_info(identifier, tag, opts = {}) ⇒ Array<(Float, Fixnum, Hash)>
Get a Data Point (Number) Returns a numeric value for the given `tag` and the entity with the given `identifier`.
-
#get_data_point_text(identifier, tag, opts = {}) ⇒ String
Get a Data Point (Text) Returns a text value for the given ‘tag` and the entity with the given `identifier`.
-
#get_data_point_text_with_http_info(identifier, tag, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get a Data Point (Text) Returns a text value for the given `tag` and the entity with the given `identifier`.
-
#initialize(api_client = ApiClient.default) ⇒ DataPointApi
constructor
A new instance of DataPointApi.
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_client ⇒ Object
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
Get a Data Point (Number) Returns a numeric value for the given ‘tag` and the entity with the given `identifier`
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)>
Get a Data Point (Number) Returns a numeric value for the given `tag` and the entity with the given `identifier`
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
Get a Data Point (Text) Returns a text value for the given ‘tag` and the entity with the given `identifier`
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)>
Get a Data Point (Text) Returns a text value for the given `tag` and the entity with the given `identifier`
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 |