Class: Intrinio::ESGApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ESGApi

Returns a new instance of ESGApi.



19
20
21
# File 'lib/intrinio-sdk/api/esg_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/esg_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#get_esg_companies(opts = {}) ⇒ ApiResponseESGCompanies

ESG Companies

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :country (String)
  • :industry (String)
  • :ticker (String)
  • :page_size (Integer)

    The number of results to return (default to 100)

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



32
33
34
35
# File 'lib/intrinio-sdk/api/esg_api.rb', line 32

def get_esg_companies(opts = {})
  data, _status_code, _headers = get_esg_companies_with_http_info(opts)
  return data
end

#get_esg_companies_with_http_info(opts = {}) ⇒ Array<(ApiResponseESGCompanies, Fixnum, Hash)>

ESG Companies

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :country (String)
  • :industry (String)
  • :ticker (String)
  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:

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

    ApiResponseESGCompanies data, response status code and response headers



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
81
82
83
84
85
86
87
# File 'lib/intrinio-sdk/api/esg_api.rb', line 46

def get_esg_companies_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ESGApi.get_esg_companies ..."
  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 ESGApi.get_esg_companies, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/esg/companies"

  # query parameters
  query_params = {}
  query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil?
  query_params[:'industry'] = opts[:'industry'] if !opts[:'industry'].nil?
  query_params[:'ticker'] = opts[:'ticker'] if !opts[:'ticker'].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 => 'ApiResponseESGCompanies')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ESGApi#get_esg_companies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_esg_company_comprehensive_ratings(identifier, opts = {}) ⇒ ApiResponseESGCompanyComprehensiveRatingHistory

ESG Company Comprehensive Ratings History

Parameters:

  • identifier

    ISIN, Intrinio ID, or Ticker

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of results to return (default to 100)

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



96
97
98
99
# File 'lib/intrinio-sdk/api/esg_api.rb', line 96

def get_esg_company_comprehensive_ratings(identifier, opts = {})
  data, _status_code, _headers = get_esg_company_comprehensive_ratings_with_http_info(identifier, opts)
  return data
end

#get_esg_company_comprehensive_ratings_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseESGCompanyComprehensiveRatingHistory, Fixnum, Hash)>

ESG Company Comprehensive Ratings History

Parameters:

  • identifier

    ISIN, Intrinio ID, or Ticker

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



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
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/intrinio-sdk/api/esg_api.rb', line 108

def get_esg_company_comprehensive_ratings_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ESGApi.get_esg_company_comprehensive_ratings ..."
  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 ESGApi.get_esg_company_comprehensive_ratings"
  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 ESGApi.get_esg_company_comprehensive_ratings, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/esg/{identifier}/comprehensive".sub('{' + 'identifier' + '}', identifier.to_s)

  # 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 => 'ApiResponseESGCompanyComprehensiveRatingHistory')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ESGApi#get_esg_company_comprehensive_ratings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_esg_company_ratings(identifier, opts = {}) ⇒ ApiResponseESGCompanyRatingHistory

ESG Company Ratings History

Parameters:

  • identifier

    ISIN, Intrinio ID, or Ticker

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of results to return (default to 100)

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



159
160
161
162
# File 'lib/intrinio-sdk/api/esg_api.rb', line 159

def get_esg_company_ratings(identifier, opts = {})
  data, _status_code, _headers = get_esg_company_ratings_with_http_info(identifier, opts)
  return data
end

#get_esg_company_ratings_with_http_info(identifier, opts = {}) ⇒ Array<(ApiResponseESGCompanyRatingHistory, Fixnum, Hash)>

ESG Company Ratings History

Parameters:

  • identifier

    ISIN, Intrinio ID, or Ticker

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# File 'lib/intrinio-sdk/api/esg_api.rb', line 171

def get_esg_company_ratings_with_http_info(identifier, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ESGApi.get_esg_company_ratings ..."
  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 ESGApi.get_esg_company_ratings"
  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 ESGApi.get_esg_company_ratings, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/esg/{identifier}".sub('{' + 'identifier' + '}', identifier.to_s)

  # 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 => 'ApiResponseESGCompanyRatingHistory')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ESGApi#get_esg_company_ratings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_esg_latest(opts = {}) ⇒ ApiResponseESGLatest

ESG Latest

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :country (String)
  • :page_size (Integer)

    The number of results to return (default to 100)

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



222
223
224
225
# File 'lib/intrinio-sdk/api/esg_api.rb', line 222

def get_esg_latest(opts = {})
  data, _status_code, _headers = get_esg_latest_with_http_info(opts)
  return data
end

#get_esg_latest_comprehensive(opts = {}) ⇒ ApiResponseESGLatestComprehensive

ESG Latest Comprehensive

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :country (String)
  • :page_size (Integer)

    The number of results to return (default to 100)

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



282
283
284
285
# File 'lib/intrinio-sdk/api/esg_api.rb', line 282

def get_esg_latest_comprehensive(opts = {})
  data, _status_code, _headers = get_esg_latest_comprehensive_with_http_info(opts)
  return data
end

#get_esg_latest_comprehensive_with_http_info(opts = {}) ⇒ Array<(ApiResponseESGLatestComprehensive, Fixnum, Hash)>

ESG Latest Comprehensive

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :country (String)
  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'lib/intrinio-sdk/api/esg_api.rb', line 294

def get_esg_latest_comprehensive_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ESGApi.get_esg_latest_comprehensive ..."
  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 ESGApi.get_esg_latest_comprehensive, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/esg/comprehensive"

  # query parameters
  query_params = {}
  query_params[:'country'] = opts[:'country'] if !opts[:'country'].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 => 'ApiResponseESGLatestComprehensive')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ESGApi#get_esg_latest_comprehensive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_esg_latest_with_http_info(opts = {}) ⇒ Array<(ApiResponseESGLatest, Fixnum, Hash)>

ESG Latest

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :country (String)
  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:

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

    ApiResponseESGLatest data, response status code and response headers



234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
# File 'lib/intrinio-sdk/api/esg_api.rb', line 234

def get_esg_latest_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: ESGApi.get_esg_latest ..."
  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 ESGApi.get_esg_latest, must be smaller than or equal to 10000.'
  end

  # resource path
  local_var_path = "/esg"

  # query parameters
  query_params = {}
  query_params[:'country'] = opts[:'country'] if !opts[:'country'].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 => 'ApiResponseESGLatest')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ESGApi#get_esg_latest\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end