Class: AuditApi::EventsApi
- Inherits:
-
Object
- Object
- AuditApi::EventsApi
- Defined in:
- lib/example_fdhbiopcnmeocbr_gem_misc/api/events_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#events_get(opts = {}) ⇒ Array<Event>
List event logs.
-
#events_get_with_http_info(opts = {}) ⇒ Array<(Array<Event>, Integer, Hash)>
List event logs.
-
#initialize(api_client = ApiClient.default) ⇒ EventsApi
constructor
A new instance of EventsApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/example_fdhbiopcnmeocbr_gem_misc/api/events_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#events_get(opts = {}) ⇒ Array<Event>
List event logs. Retrieves the event logs for given time period. All date & times are in UTC.
33 34 35 36 |
# File 'lib/example_fdhbiopcnmeocbr_gem_misc/api/events_api.rb', line 33 def events_get(opts = {}) data, _status_code, _headers = events_get_with_http_info(opts) data end |
#events_get_with_http_info(opts = {}) ⇒ Array<(Array<Event>, Integer, Hash)>
List event logs. Retrieves the event logs for given time period. All date & times are in UTC.
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 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/example_fdhbiopcnmeocbr_gem_misc/api/events_api.rb', line 49 def events_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EventsApi.events_get ...' end allowable_values = ["ASC", "DESC"] if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order']) fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}" end allowable_values = ["POST", "PUT", "PATCH", "DELETE"] if @api_client.config.client_side_validation && opts[:'verb'] && !allowable_values.include?(opts[:'verb']) fail ArgumentError, "invalid value for \"verb\", must be one of #{allowable_values}" end # resource path local_var_path = '/events' # query parameters query_params = opts[:query_params] || {} query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'username'] = opts[:'username'] if !opts[:'username'].nil? query_params[:'verb'] = opts[:'verb'] if !opts[:'verb'].nil? query_params[:'uri'] = opts[:'uri'] if !opts[:'uri'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<Event>' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = opts.merge( :operation => :"EventsApi.events_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: EventsApi#events_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |