Class: Late::LogsApi
- Inherits:
-
Object
- Object
- Late::LogsApi
- Defined in:
- lib/late-sdk/api/logs_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_post_logs(post_id, opts = {}) ⇒ GetPostLogs200Response
Get post logs Retrieve all publishing logs for a specific post.
-
#get_post_logs_with_http_info(post_id, opts = {}) ⇒ Array<(GetPostLogs200Response, Integer, Hash)>
Get post logs Retrieve all publishing logs for a specific post.
-
#initialize(api_client = ApiClient.default) ⇒ LogsApi
constructor
A new instance of LogsApi.
-
#list_connection_logs(opts = {}) ⇒ ListConnectionLogs200Response
List connection logs Deprecated. Use ‘GET /v1/logs?type=connections` instead.
-
#list_connection_logs_with_http_info(opts = {}) ⇒ Array<(ListConnectionLogs200Response, Integer, Hash)>
List connection logs Deprecated. Use `GET /v1/logs?type=connections` instead.
-
#list_logs(opts = {}) ⇒ ListLogs200Response
List activity logs Unified logs endpoint.
-
#list_logs_with_http_info(opts = {}) ⇒ Array<(ListLogs200Response, Integer, Hash)>
List activity logs Unified logs endpoint.
-
#list_posts_logs(opts = {}) ⇒ ListPostsLogs200Response
List publishing logs Deprecated. Use ‘GET /v1/logs?type=publishing` instead.
-
#list_posts_logs_with_http_info(opts = {}) ⇒ Array<(ListPostsLogs200Response, Integer, Hash)>
List publishing logs Deprecated. Use `GET /v1/logs?type=publishing` instead.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/late-sdk/api/logs_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_post_logs(post_id, opts = {}) ⇒ GetPostLogs200Response
Get post logs Retrieve all publishing logs for a specific post. Shows the complete history of publishing attempts for that post across all platforms.
28 29 30 31 |
# File 'lib/late-sdk/api/logs_api.rb', line 28 def get_post_logs(post_id, opts = {}) data, _status_code, _headers = get_post_logs_with_http_info(post_id, opts) data end |
#get_post_logs_with_http_info(post_id, opts = {}) ⇒ Array<(GetPostLogs200Response, Integer, Hash)>
Get post logs Retrieve all publishing logs for a specific post. Shows the complete history of publishing attempts for that post across all platforms.
39 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 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/late-sdk/api/logs_api.rb', line 39 def get_post_logs_with_http_info(post_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LogsApi.get_post_logs ...' end # verify the required parameter 'post_id' is set if @api_client.config.client_side_validation && post_id.nil? fail ArgumentError, "Missing the required parameter 'post_id' when calling LogsApi.get_post_logs" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LogsApi.get_post_logs, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LogsApi.get_post_logs, must be greater than or equal to 1.' end # resource path local_var_path = '/v1/posts/{postId}/logs'.sub('{' + 'postId' + '}', CGI.escape(post_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetPostLogs200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"LogsApi.get_post_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#get_post_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_connection_logs(opts = {}) ⇒ ListConnectionLogs200Response
List connection logs Deprecated. Use ‘GET /v1/logs?type=connections` instead. Retrieve connection event logs. Logs are retained for 90 days.
106 107 108 109 |
# File 'lib/late-sdk/api/logs_api.rb', line 106 def list_connection_logs(opts = {}) data, _status_code, _headers = list_connection_logs_with_http_info(opts) data end |
#list_connection_logs_with_http_info(opts = {}) ⇒ Array<(ListConnectionLogs200Response, Integer, Hash)>
List connection logs Deprecated. Use `GET /v1/logs?type=connections` instead. Retrieve connection event logs. Logs are retained for 90 days.
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 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 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/late-sdk/api/logs_api.rb', line 121 def list_connection_logs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LogsApi.list_connection_logs ...' end allowable_values = ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "all"] if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform']) fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}" end allowable_values = ["connect_success", "connect_failed", "disconnect", "reconnect_success", "reconnect_failed", "all"] if @api_client.config.client_side_validation && opts[:'event_type'] && !allowable_values.include?(opts[:'event_type']) fail ArgumentError, "invalid value for \"event_type\", must be one of #{allowable_values}" end allowable_values = ["success", "failed", "all"] if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] > 7 fail ArgumentError, 'invalid value for "opts[:"days"]" when calling LogsApi.list_connection_logs, must be smaller than or equal to 7.' end if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] < 1 fail ArgumentError, 'invalid value for "opts[:"days"]" when calling LogsApi.list_connection_logs, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LogsApi.list_connection_logs, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LogsApi.list_connection_logs, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'skip'].nil? && opts[:'skip'] < 0 fail ArgumentError, 'invalid value for "opts[:"skip"]" when calling LogsApi.list_connection_logs, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/connections/logs' # query parameters query_params = opts[:query_params] || {} query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil? query_params[:'eventType'] = opts[:'event_type'] if !opts[:'event_type'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListConnectionLogs200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"LogsApi.list_connection_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_connection_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_logs(opts = {}) ⇒ ListLogs200Response
List activity logs Unified logs endpoint. Returns logs for publishing, connections, webhooks, and messaging. Filter by type, platform, status, and time range. Logs are retained for 90 days.
215 216 217 218 |
# File 'lib/late-sdk/api/logs_api.rb', line 215 def list_logs(opts = {}) data, _status_code, _headers = list_logs_with_http_info(opts) data end |
#list_logs_with_http_info(opts = {}) ⇒ Array<(ListLogs200Response, Integer, Hash)>
List activity logs Unified logs endpoint. Returns logs for publishing, connections, webhooks, and messaging. Filter by type, platform, status, and time range. Logs are retained for 90 days.
232 233 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 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 |
# File 'lib/late-sdk/api/logs_api.rb', line 232 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 = ["publishing", "connections", "webhooks", "messaging"] if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type']) fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}" end allowable_values = ["success", "failed", "pending", "skipped", "all"] if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" end allowable_values = ["tiktok", "instagram", "whatsapp", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "all"] if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform']) fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] > 90 fail ArgumentError, 'invalid value for "opts[:"days"]" when calling LogsApi.list_logs, must be smaller than or equal to 90.' end if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] < 1 fail ArgumentError, 'invalid value for "opts[:"days"]" when calling LogsApi.list_logs, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LogsApi.list_logs, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LogsApi.list_logs, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'skip'].nil? && opts[:'skip'] < 0 fail ArgumentError, 'invalid value for "opts[:"skip"]" when calling LogsApi.list_logs, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/logs' # query parameters query_params = opts[:query_params] || {} query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil? query_params[:'action'] = opts[:'action'] if !opts[:'action'].nil? query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListLogs200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = 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 |
#list_posts_logs(opts = {}) ⇒ ListPostsLogs200Response
List publishing logs Deprecated. Use ‘GET /v1/logs?type=publishing` instead. Retrieve publishing logs for all posts. Logs are retained for 90 days.
327 328 329 330 |
# File 'lib/late-sdk/api/logs_api.rb', line 327 def list_posts_logs(opts = {}) data, _status_code, _headers = list_posts_logs_with_http_info(opts) data end |
#list_posts_logs_with_http_info(opts = {}) ⇒ Array<(ListPostsLogs200Response, Integer, Hash)>
List publishing logs Deprecated. Use `GET /v1/logs?type=publishing` instead. Retrieve publishing logs for all posts. Logs are retained for 90 days.
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 |
# File 'lib/late-sdk/api/logs_api.rb', line 343 def list_posts_logs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LogsApi.list_posts_logs ...' end allowable_values = ["success", "failed", "pending", "skipped", "all"] if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" end allowable_values = ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "all"] if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform']) fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}" end allowable_values = ["publish", "retry", "media_upload", "rate_limit_pause", "token_refresh", "cancelled", "all"] if @api_client.config.client_side_validation && opts[:'action'] && !allowable_values.include?(opts[:'action']) fail ArgumentError, "invalid value for \"action\", must be one of #{allowable_values}" end if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] > 7 fail ArgumentError, 'invalid value for "opts[:"days"]" when calling LogsApi.list_posts_logs, must be smaller than or equal to 7.' end if @api_client.config.client_side_validation && !opts[:'days'].nil? && opts[:'days'] < 1 fail ArgumentError, 'invalid value for "opts[:"days"]" when calling LogsApi.list_posts_logs, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LogsApi.list_posts_logs, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LogsApi.list_posts_logs, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'skip'].nil? && opts[:'skip'] < 0 fail ArgumentError, 'invalid value for "opts[:"skip"]" when calling LogsApi.list_posts_logs, must be greater than or equal to 0.' end # resource path local_var_path = '/v1/posts/logs' # query parameters query_params = opts[:query_params] || {} query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil? query_params[:'action'] = opts[:'action'] if !opts[:'action'].nil? query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil? query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListPostsLogs200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"LogsApi.list_posts_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_posts_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |