Class: Daily::LogsApi
- Inherits:
-
Object
- Object
- Daily::LogsApi
- Defined in:
- lib/daily-ruby/api/logs_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ LogsApi
constructor
A new instance of LogsApi.
-
#list_api_logs(opts = {}) ⇒ ListAPILogs200Response
/logs/api.
-
#list_api_logs_with_http_info(opts = {}) ⇒ Array<(ListAPILogs200Response, Integer, Hash)>
/logs/api.
-
#list_logs(opts = {}) ⇒ Object
/logs.
-
#list_logs_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
/logs.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/daily-ruby/api/logs_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#list_api_logs(opts = {}) ⇒ ListAPILogs200Response
/logs/api
30 31 32 33 |
# File 'lib/daily-ruby/api/logs_api.rb', line 30 def list_api_logs(opts = {}) data, _status_code, _headers = list_api_logs_with_http_info(opts) data end |
#list_api_logs_with_http_info(opts = {}) ⇒ Array<(ListAPILogs200Response, Integer, Hash)>
/logs/api
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 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/daily-ruby/api/logs_api.rb', line 43 def list_api_logs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LogsApi.list_api_logs ...' end # resource path local_var_path = '/logs/api' # query parameters query_params = opts[:query_params] || {} query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil? query_params[:'ending_before'] = opts[:'ending_before'] if !opts[:'ending_before'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'source'] = opts[:'source'] if !opts[:'source'].nil? query_params[:'url'] = opts[:'url'] if !opts[:'url'].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] || 'ListAPILogs200Response' # auth_names auth_names = opts[:debug_auth_names] || ['sec0'] = opts.merge( :operation => :"LogsApi.list_api_logs", :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: LogsApi#list_api_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_logs(opts = {}) ⇒ Object
/logs
105 106 107 108 |
# File 'lib/daily-ruby/api/logs_api.rb', line 105 def list_logs(opts = {}) data, _status_code, _headers = list_logs_with_http_info(opts) data end |
#list_logs_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
/logs
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 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/daily-ruby/api/logs_api.rb', line 123 def list_logs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LogsApi.list_logs ...' end allowable_values = ["ERROR", "INFO", "DEBUG"] if @api_client.config.client_side_validation && opts[:'log_level'] && !allowable_values.include?(opts[:'log_level']) fail ArgumentError, "invalid value for \"log_level\", must be one of #{allowable_values}" end # resource path local_var_path = '/logs' # query parameters query_params = opts[:query_params] || {} query_params[:'includeLogs'] = opts[:'include_logs'] if !opts[:'include_logs'].nil? query_params[:'includeMetrics'] = opts[:'include_metrics'] if !opts[:'include_metrics'].nil? query_params[:'userSessionId'] = opts[:'user_session_id'] if !opts[:'user_session_id'].nil? query_params[:'mtgSessionId'] = opts[:'mtg_session_id'] if !opts[:'mtg_session_id'].nil? query_params[:'logLevel'] = opts[:'log_level'] if !opts[:'log_level'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'startTime'] = opts[:'start_time'] if !opts[:'start_time'].nil? query_params[:'endTime'] = opts[:'end_time'] if !opts[:'end_time'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].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] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['sec0'] = opts.merge( :operation => :"LogsApi.list_logs", :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: LogsApi#list_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |