Class: PostBoost::PostsApi
- Inherits:
-
Object
- Object
- PostBoost::PostsApi
- Defined in:
- lib/postboost/api/posts_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_post_to_queue(workspace_uuid, post_uuid, opts = {}) ⇒ ScheduleResult
Add post to queue Add an existing post to the smart publishing queue.
-
#add_post_to_queue_with_http_info(workspace_uuid, post_uuid, opts = {}) ⇒ Array<(ScheduleResult, Integer, Hash)>
Add post to queue Add an existing post to the smart publishing queue.
-
#approve_post(workspace_uuid, post_uuid, opts = {}) ⇒ ScheduleResult
Approve post Approve a post that is pending review.
-
#approve_post_with_http_info(workspace_uuid, post_uuid, opts = {}) ⇒ Array<(ScheduleResult, Integer, Hash)>
Approve post Approve a post that is pending review.
-
#create_post(workspace_uuid, post_input, opts = {}) ⇒ Post
Create post Create a new post.
-
#create_post_with_http_info(workspace_uuid, post_input, opts = {}) ⇒ Array<(Post, Integer, Hash)>
Create post Create a new post.
-
#delete_post(workspace_uuid, post_uuid, opts = {}) ⇒ DeleteResult
Delete post.
-
#delete_post_with_http_info(workspace_uuid, post_uuid, opts = {}) ⇒ Array<(DeleteResult, Integer, Hash)>
Delete post.
-
#delete_posts_bulk(workspace_uuid, delete_posts_bulk_request, opts = {}) ⇒ DeleteResult
Delete posts (bulk) Delete multiple posts at once.
-
#delete_posts_bulk_with_http_info(workspace_uuid, delete_posts_bulk_request, opts = {}) ⇒ Array<(DeleteResult, Integer, Hash)>
Delete posts (bulk) Delete multiple posts at once.
-
#get_post(workspace_uuid, post_uuid, opts = {}) ⇒ Post
Get post.
-
#get_post_with_http_info(workspace_uuid, post_uuid, opts = {}) ⇒ Array<(Post, Integer, Hash)>
Get post.
-
#initialize(api_client = ApiClient.default) ⇒ PostsApi
constructor
A new instance of PostsApi.
-
#list_posts(workspace_uuid, opts = {}) ⇒ ListPosts200Response
List posts Returns a paginated list of posts in the workspace.
-
#list_posts_with_http_info(workspace_uuid, opts = {}) ⇒ Array<(ListPosts200Response, Integer, Hash)>
List posts Returns a paginated list of posts in the workspace.
-
#schedule_post(workspace_uuid, post_uuid, schedule_post_request, opts = {}) ⇒ ScheduleResult
Schedule post Schedule an existing post.
-
#schedule_post_with_http_info(workspace_uuid, post_uuid, schedule_post_request, opts = {}) ⇒ Array<(ScheduleResult, Integer, Hash)>
Schedule post Schedule an existing post.
-
#update_post(workspace_uuid, post_uuid, post_input, opts = {}) ⇒ Object
Update post.
-
#update_post_with_http_info(workspace_uuid, post_uuid, post_input, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Update post.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ PostsApi
19 20 21 |
# File 'lib/postboost/api/posts_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/postboost/api/posts_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_post_to_queue(workspace_uuid, post_uuid, opts = {}) ⇒ ScheduleResult
Add post to queue Add an existing post to the smart publishing queue.
28 29 30 31 |
# File 'lib/postboost/api/posts_api.rb', line 28 def add_post_to_queue(workspace_uuid, post_uuid, opts = {}) data, _status_code, _headers = add_post_to_queue_with_http_info(workspace_uuid, post_uuid, opts) data end |
#add_post_to_queue_with_http_info(workspace_uuid, post_uuid, opts = {}) ⇒ Array<(ScheduleResult, Integer, Hash)>
Add post to queue Add an existing post to the smart publishing queue.
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 |
# File 'lib/postboost/api/posts_api.rb', line 39 def add_post_to_queue_with_http_info(workspace_uuid, post_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PostsApi.add_post_to_queue ...' end # verify the required parameter 'workspace_uuid' is set if @api_client.config.client_side_validation && workspace_uuid.nil? fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling PostsApi.add_post_to_queue" end # verify the required parameter 'post_uuid' is set if @api_client.config.client_side_validation && post_uuid.nil? fail ArgumentError, "Missing the required parameter 'post_uuid' when calling PostsApi.add_post_to_queue" end # resource path local_var_path = '/{workspaceUuid}/posts/add-to-queue/{postUuid}'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s)).sub('{' + 'postUuid' + '}', CGI.escape(post_uuid.to_s)) # query parameters query_params = opts[:query_params] || {} # 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] || 'ScheduleResult' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PostsApi.add_post_to_queue", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PostsApi#add_post_to_queue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#approve_post(workspace_uuid, post_uuid, opts = {}) ⇒ ScheduleResult
Approve post Approve a post that is pending review.
97 98 99 100 |
# File 'lib/postboost/api/posts_api.rb', line 97 def approve_post(workspace_uuid, post_uuid, opts = {}) data, _status_code, _headers = approve_post_with_http_info(workspace_uuid, post_uuid, opts) data end |
#approve_post_with_http_info(workspace_uuid, post_uuid, opts = {}) ⇒ Array<(ScheduleResult, Integer, Hash)>
Approve post Approve a post that is pending review.
108 109 110 111 112 113 114 115 116 117 118 119 120 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 |
# File 'lib/postboost/api/posts_api.rb', line 108 def approve_post_with_http_info(workspace_uuid, post_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PostsApi.approve_post ...' end # verify the required parameter 'workspace_uuid' is set if @api_client.config.client_side_validation && workspace_uuid.nil? fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling PostsApi.approve_post" end # verify the required parameter 'post_uuid' is set if @api_client.config.client_side_validation && post_uuid.nil? fail ArgumentError, "Missing the required parameter 'post_uuid' when calling PostsApi.approve_post" end # resource path local_var_path = '/{workspaceUuid}/posts/approve/{postUuid}'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s)).sub('{' + 'postUuid' + '}', CGI.escape(post_uuid.to_s)) # query parameters query_params = opts[:query_params] || {} # 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] || 'ScheduleResult' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PostsApi.approve_post", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PostsApi#approve_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_post(workspace_uuid, post_input, opts = {}) ⇒ Post
Create post Create a new post. Use ‘schedule: true` with date and time to schedule, `schedule_now: true` to publish immediately, or `queue: true` to add to the smart publishing queue.
166 167 168 169 |
# File 'lib/postboost/api/posts_api.rb', line 166 def create_post(workspace_uuid, post_input, opts = {}) data, _status_code, _headers = create_post_with_http_info(workspace_uuid, post_input, opts) data end |
#create_post_with_http_info(workspace_uuid, post_input, opts = {}) ⇒ Array<(Post, Integer, Hash)>
Create post Create a new post. Use `schedule: true` with `date` and `time` to schedule, `schedule_now: true` to publish immediately, or `queue: true` to add to the smart publishing queue.
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 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/postboost/api/posts_api.rb', line 177 def create_post_with_http_info(workspace_uuid, post_input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PostsApi.create_post ...' end # verify the required parameter 'workspace_uuid' is set if @api_client.config.client_side_validation && workspace_uuid.nil? fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling PostsApi.create_post" end # verify the required parameter 'post_input' is set if @api_client.config.client_side_validation && post_input.nil? fail ArgumentError, "Missing the required parameter 'post_input' when calling PostsApi.create_post" end # resource path local_var_path = '/{workspaceUuid}/posts'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s)) # query parameters query_params = opts[:query_params] || {} # 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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(post_input) # return_type return_type = opts[:debug_return_type] || 'Post' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PostsApi.create_post", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PostsApi#create_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_post(workspace_uuid, post_uuid, opts = {}) ⇒ DeleteResult
Delete post
240 241 242 243 |
# File 'lib/postboost/api/posts_api.rb', line 240 def delete_post(workspace_uuid, post_uuid, opts = {}) data, _status_code, _headers = delete_post_with_http_info(workspace_uuid, post_uuid, opts) data end |
#delete_post_with_http_info(workspace_uuid, post_uuid, opts = {}) ⇒ Array<(DeleteResult, Integer, Hash)>
Delete post
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 |
# File 'lib/postboost/api/posts_api.rb', line 251 def delete_post_with_http_info(workspace_uuid, post_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PostsApi.delete_post ...' end # verify the required parameter 'workspace_uuid' is set if @api_client.config.client_side_validation && workspace_uuid.nil? fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling PostsApi.delete_post" end # verify the required parameter 'post_uuid' is set if @api_client.config.client_side_validation && post_uuid.nil? fail ArgumentError, "Missing the required parameter 'post_uuid' when calling PostsApi.delete_post" end # resource path local_var_path = '/{workspaceUuid}/posts/{postUuid}'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s)).sub('{' + 'postUuid' + '}', CGI.escape(post_uuid.to_s)) # query parameters query_params = opts[:query_params] || {} # 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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'delete_post_request']) # return_type return_type = opts[:debug_return_type] || 'DeleteResult' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PostsApi.delete_post", :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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PostsApi#delete_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_posts_bulk(workspace_uuid, delete_posts_bulk_request, opts = {}) ⇒ DeleteResult
Delete posts (bulk) Delete multiple posts at once.
314 315 316 317 |
# File 'lib/postboost/api/posts_api.rb', line 314 def delete_posts_bulk(workspace_uuid, delete_posts_bulk_request, opts = {}) data, _status_code, _headers = delete_posts_bulk_with_http_info(workspace_uuid, delete_posts_bulk_request, opts) data end |
#delete_posts_bulk_with_http_info(workspace_uuid, delete_posts_bulk_request, opts = {}) ⇒ Array<(DeleteResult, Integer, Hash)>
Delete posts (bulk) Delete multiple posts at once.
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 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 |
# File 'lib/postboost/api/posts_api.rb', line 325 def delete_posts_bulk_with_http_info(workspace_uuid, delete_posts_bulk_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PostsApi.delete_posts_bulk ...' end # verify the required parameter 'workspace_uuid' is set if @api_client.config.client_side_validation && workspace_uuid.nil? fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling PostsApi.delete_posts_bulk" end # verify the required parameter 'delete_posts_bulk_request' is set if @api_client.config.client_side_validation && delete_posts_bulk_request.nil? fail ArgumentError, "Missing the required parameter 'delete_posts_bulk_request' when calling PostsApi.delete_posts_bulk" end # resource path local_var_path = '/{workspaceUuid}/posts'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s)) # query parameters query_params = opts[:query_params] || {} # 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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(delete_posts_bulk_request) # return_type return_type = opts[:debug_return_type] || 'DeleteResult' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PostsApi.delete_posts_bulk", :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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PostsApi#delete_posts_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_post(workspace_uuid, post_uuid, opts = {}) ⇒ Post
Get post
387 388 389 390 |
# File 'lib/postboost/api/posts_api.rb', line 387 def get_post(workspace_uuid, post_uuid, opts = {}) data, _status_code, _headers = get_post_with_http_info(workspace_uuid, post_uuid, opts) data end |
#get_post_with_http_info(workspace_uuid, post_uuid, opts = {}) ⇒ Array<(Post, Integer, Hash)>
Get post
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 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 |
# File 'lib/postboost/api/posts_api.rb', line 397 def get_post_with_http_info(workspace_uuid, post_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PostsApi.get_post ...' end # verify the required parameter 'workspace_uuid' is set if @api_client.config.client_side_validation && workspace_uuid.nil? fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling PostsApi.get_post" end # verify the required parameter 'post_uuid' is set if @api_client.config.client_side_validation && post_uuid.nil? fail ArgumentError, "Missing the required parameter 'post_uuid' when calling PostsApi.get_post" end # resource path local_var_path = '/{workspaceUuid}/posts/{postUuid}'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s)).sub('{' + 'postUuid' + '}', CGI.escape(post_uuid.to_s)) # query parameters query_params = opts[:query_params] || {} # 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] || 'Post' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PostsApi.get_post", :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: PostsApi#get_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_posts(workspace_uuid, opts = {}) ⇒ ListPosts200Response
List posts Returns a paginated list of posts in the workspace.
455 456 457 458 |
# File 'lib/postboost/api/posts_api.rb', line 455 def list_posts(workspace_uuid, opts = {}) data, _status_code, _headers = list_posts_with_http_info(workspace_uuid, opts) data end |
#list_posts_with_http_info(workspace_uuid, opts = {}) ⇒ Array<(ListPosts200Response, Integer, Hash)>
List posts Returns a paginated list of posts in the workspace.
466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 |
# File 'lib/postboost/api/posts_api.rb', line 466 def list_posts_with_http_info(workspace_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PostsApi.list_posts ...' end # verify the required parameter 'workspace_uuid' is set if @api_client.config.client_side_validation && workspace_uuid.nil? fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling PostsApi.list_posts" end # resource path local_var_path = '/{workspaceUuid}/posts'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].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] || 'ListPosts200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PostsApi.list_posts", :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: PostsApi#list_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#schedule_post(workspace_uuid, post_uuid, schedule_post_request, opts = {}) ⇒ ScheduleResult
Schedule post Schedule an existing post. Set ‘postNow: true` to publish immediately.
522 523 524 525 |
# File 'lib/postboost/api/posts_api.rb', line 522 def schedule_post(workspace_uuid, post_uuid, schedule_post_request, opts = {}) data, _status_code, _headers = schedule_post_with_http_info(workspace_uuid, post_uuid, schedule_post_request, opts) data end |
#schedule_post_with_http_info(workspace_uuid, post_uuid, schedule_post_request, opts = {}) ⇒ Array<(ScheduleResult, Integer, Hash)>
Schedule post Schedule an existing post. Set `postNow: true` to publish immediately.
534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 |
# File 'lib/postboost/api/posts_api.rb', line 534 def schedule_post_with_http_info(workspace_uuid, post_uuid, schedule_post_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PostsApi.schedule_post ...' end # verify the required parameter 'workspace_uuid' is set if @api_client.config.client_side_validation && workspace_uuid.nil? fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling PostsApi.schedule_post" end # verify the required parameter 'post_uuid' is set if @api_client.config.client_side_validation && post_uuid.nil? fail ArgumentError, "Missing the required parameter 'post_uuid' when calling PostsApi.schedule_post" end # verify the required parameter 'schedule_post_request' is set if @api_client.config.client_side_validation && schedule_post_request.nil? fail ArgumentError, "Missing the required parameter 'schedule_post_request' when calling PostsApi.schedule_post" end # resource path local_var_path = '/{workspaceUuid}/posts/schedule/{postUuid}'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s)).sub('{' + 'postUuid' + '}', CGI.escape(post_uuid.to_s)) # query parameters query_params = opts[:query_params] || {} # 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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(schedule_post_request) # return_type return_type = opts[:debug_return_type] || 'ScheduleResult' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PostsApi.schedule_post", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PostsApi#schedule_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_post(workspace_uuid, post_uuid, post_input, opts = {}) ⇒ Object
Update post
601 602 603 604 |
# File 'lib/postboost/api/posts_api.rb', line 601 def update_post(workspace_uuid, post_uuid, post_input, opts = {}) data, _status_code, _headers = update_post_with_http_info(workspace_uuid, post_uuid, post_input, opts) data end |
#update_post_with_http_info(workspace_uuid, post_uuid, post_input, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Update post
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 |
# File 'lib/postboost/api/posts_api.rb', line 612 def update_post_with_http_info(workspace_uuid, post_uuid, post_input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PostsApi.update_post ...' end # verify the required parameter 'workspace_uuid' is set if @api_client.config.client_side_validation && workspace_uuid.nil? fail ArgumentError, "Missing the required parameter 'workspace_uuid' when calling PostsApi.update_post" end # verify the required parameter 'post_uuid' is set if @api_client.config.client_side_validation && post_uuid.nil? fail ArgumentError, "Missing the required parameter 'post_uuid' when calling PostsApi.update_post" end # verify the required parameter 'post_input' is set if @api_client.config.client_side_validation && post_input.nil? fail ArgumentError, "Missing the required parameter 'post_input' when calling PostsApi.update_post" end # resource path local_var_path = '/{workspaceUuid}/posts/{postUuid}'.sub('{' + 'workspaceUuid' + '}', CGI.escape(workspace_uuid.to_s)).sub('{' + 'postUuid' + '}', CGI.escape(post_uuid.to_s)) # query parameters query_params = opts[:query_params] || {} # 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'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(post_input) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"PostsApi.update_post", :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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PostsApi#update_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |