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 Retrieve connection event logs showing account connection and disconnection history.
-
#list_connection_logs_with_http_info(opts = {}) ⇒ Array<(ListConnectionLogs200Response, Integer, Hash)>
List connection logs Retrieve connection event logs showing account connection and disconnection history.
-
#list_posts_logs(opts = {}) ⇒ ListPostsLogs200Response
List publishing logs Retrieve publishing logs for all posts with detailed information about each publishing attempt.
-
#list_posts_logs_with_http_info(opts = {}) ⇒ Array<(ListPostsLogs200Response, Integer, Hash)>
List publishing logs Retrieve publishing logs for all posts with detailed information about each publishing attempt.
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 Retrieve connection event logs showing account connection and disconnection history. Event types: connect_success, connect_failed, disconnect, reconnect_success, reconnect_failed. Logs are automatically deleted after 7 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 Retrieve connection event logs showing account connection and disconnection history. Event types: connect_success, connect_failed, disconnect, reconnect_success, reconnect_failed. Logs are automatically deleted after 7 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_posts_logs(opts = {}) ⇒ ListPostsLogs200Response
List publishing logs Retrieve publishing logs for all posts with detailed information about each publishing attempt. Filter by status, platform, or action. Logs are automatically deleted after 7 days.
214 215 216 217 |
# File 'lib/late-sdk/api/logs_api.rb', line 214 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 Retrieve publishing logs for all posts with detailed information about each publishing attempt. Filter by status, platform, or action. Logs are automatically deleted after 7 days.
230 231 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 |
# File 'lib/late-sdk/api/logs_api.rb', line 230 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 |