Class: Intrinio::InsiderTransactionFilingsApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ InsiderTransactionFilingsApi

Returns a new instance of InsiderTransactionFilingsApi.



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

def api_client
  @api_client
end

Instance Method Details

#get_all_insider_transaction_filings(opts = {}) ⇒ ApiResponseOwnerInsiderTransactionFilings

All Insider Transactions Filings Returns all insider transactions filings fitting the optional supplied start and end date.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :start_date (Date)

    Filed on or after the given date

  • :end_date (Date)

    Filed before or after the given date

  • :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:



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

def get_all_insider_transaction_filings(opts = {})
  data, _status_code, _headers = get_all_insider_transaction_filings_with_http_info(opts)
  return data
end

#get_all_insider_transaction_filings_with_http_info(opts = {}) ⇒ Array<(ApiResponseOwnerInsiderTransactionFilings, Fixnum, Hash)>

All Insider Transactions Filings Returns all insider transactions filings fitting the optional supplied start and end date.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :start_date (Date)

    Filed on or after the given date

  • :end_date (Date)

    Filed before or after the given date

  • :page_size (Integer)

    The number of results to return

  • :next_page (String)

    Gets the next page of data from a previous API call

Returns:



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
81
82
83
84
# File 'lib/intrinio-sdk/api/insider_transaction_filings_api.rb', line 44

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

  # resource path
  local_var_path = "/insider_transaction_filings"

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