Class: Hubspot::Cms::Blogs::BlogPosts::BlogPostsApi
- Inherits:
-
Object
- Object
- Hubspot::Cms::Blogs::BlogPosts::BlogPostsApi
- Defined in:
- lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#archive(object_id, opts = {}) ⇒ nil
Delete a Blog Post Delete the Blog Post object identified by the id in the path.
-
#archive_batch(batch_input_string, opts = {}) ⇒ nil
Delete a batch of Blog Posts Delete the Blog Post objects identified in the request body.
-
#archive_batch_with_http_info(batch_input_string, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a batch of Blog Posts Delete the Blog Post objects identified in the request body.
-
#archive_with_http_info(object_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a Blog Post Delete the Blog Post object identified by the id in the path.
-
#attach_to_lang_group(attach_to_lang_primary_request_v_next, opts = {}) ⇒ nil
Attach a Blog Post to a multi-language group Attach a Blog Post to a multi-language group.
-
#attach_to_lang_group_with_http_info(attach_to_lang_primary_request_v_next, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Attach a Blog Post to a multi-language group Attach a Blog Post to a multi-language group.
-
#clone(content_clone_request_v_next, opts = {}) ⇒ BlogPost
Clone a Blog Post Clone a Blog Post.
-
#clone_with_http_info(content_clone_request_v_next, opts = {}) ⇒ Array<(BlogPost, Integer, Hash)>
Clone a Blog Post Clone a Blog Post.
-
#create(blog_post, opts = {}) ⇒ BlogPost
Create a new Blog Post Create a new Blog Post.
-
#create_batch(batch_input_blog_post, opts = {}) ⇒ BatchResponseBlogPost
Create a batch of Blog Posts Create the Blog Post objects detailed in the request body.
-
#create_batch_with_http_info(batch_input_blog_post, opts = {}) ⇒ Array<(BatchResponseBlogPost, Integer, Hash)>
Create a batch of Blog Posts Create the Blog Post objects detailed in the request body.
-
#create_lang_variation(blog_post_language_clone_request_v_next, opts = {}) ⇒ BlogPost
Create a new language variation Create a new language variation from an existing Blog Post.
-
#create_lang_variation_with_http_info(blog_post_language_clone_request_v_next, opts = {}) ⇒ Array<(BlogPost, Integer, Hash)>
Create a new language variation Create a new language variation from an existing Blog Post.
-
#create_with_http_info(blog_post, opts = {}) ⇒ Array<(BlogPost, Integer, Hash)>
Create a new Blog Post Create a new Blog Post.
-
#detach_from_lang_group(detach_from_lang_group_request_v_next, opts = {}) ⇒ nil
Detach a Blog Post from a multi-language group Detach a Blog Post from a multi-language group.
-
#detach_from_lang_group_with_http_info(detach_from_lang_group_request_v_next, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Detach a Blog Post from a multi-language group Detach a Blog Post from a multi-language group.
-
#get_by_id(object_id, opts = {}) ⇒ BlogPost
Retrieve a Blog Post Retrieve the Blog Post object identified by the id in the path.
-
#get_by_id_with_http_info(object_id, opts = {}) ⇒ Array<(BlogPost, Integer, Hash)>
Retrieve a Blog Post Retrieve the Blog Post object identified by the id in the path.
-
#get_draft_by_id(object_id, opts = {}) ⇒ BlogPost
Retrieve the full draft version of the Blog Post Retrieve the full draft version of the Blog Post.
-
#get_draft_by_id_with_http_info(object_id, opts = {}) ⇒ Array<(BlogPost, Integer, Hash)>
Retrieve the full draft version of the Blog Post Retrieve the full draft version of the Blog Post.
-
#get_page(opts = {}) ⇒ CollectionResponseWithTotalBlogPostForwardPaging
Get all Blog Posts Get the list of blog posts.
-
#get_page_with_http_info(opts = {}) ⇒ Array<(CollectionResponseWithTotalBlogPostForwardPaging, Integer, Hash)>
Get all Blog Posts Get the list of blog posts.
-
#get_previous_version(object_id, revision_id, opts = {}) ⇒ VersionBlogPost
Retrieves a previous version of a blog post Retrieves a previous version of a blog post.
-
#get_previous_version_with_http_info(object_id, revision_id, opts = {}) ⇒ Array<(VersionBlogPost, Integer, Hash)>
Retrieves a previous version of a blog post Retrieves a previous version of a blog post.
-
#get_previous_versions(object_id, opts = {}) ⇒ CollectionResponseWithTotalVersionBlogPost
Retrieves all the previous versions of a blog post Retrieves all the previous versions of a blog post.
-
#get_previous_versions_with_http_info(object_id, opts = {}) ⇒ Array<(CollectionResponseWithTotalVersionBlogPost, Integer, Hash)>
Retrieves all the previous versions of a blog post Retrieves all the previous versions of a blog post.
-
#initialize(api_client = ApiClient.default) ⇒ BlogPostsApi
constructor
A new instance of BlogPostsApi.
-
#push_live(object_id, opts = {}) ⇒ nil
Push Blog Post draft edits live Take any changes from the draft version of the Blog Post and apply them to the live version.
-
#push_live_with_http_info(object_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Push Blog Post draft edits live Take any changes from the draft version of the Blog Post and apply them to the live version.
-
#read_batch(batch_input_string, opts = {}) ⇒ BatchResponseBlogPost
Retrieve a batch of Blog Posts Retrieve the Blog Post objects identified in the request body.
-
#read_batch_with_http_info(batch_input_string, opts = {}) ⇒ Array<(BatchResponseBlogPost, Integer, Hash)>
Retrieve a batch of Blog Posts Retrieve the Blog Post objects identified in the request body.
-
#reset_draft(object_id, opts = {}) ⇒ nil
Reset the Blog Post draft to the live version Discards any edits and resets the draft to the live version.
-
#reset_draft_with_http_info(object_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Reset the Blog Post draft to the live version Discards any edits and resets the draft to the live version.
-
#restore_previous_version(object_id, revision_id, opts = {}) ⇒ BlogPost
Restore a previous version of a blog post Takes a specified version of a blog post and restores it.
-
#restore_previous_version_to_draft(object_id, revision_id, opts = {}) ⇒ BlogPost
Restore a previous version of a blog post, to the draft version of the blog post Takes a specified version of a blog post, sets it as the new draft version of the blog post.
-
#restore_previous_version_to_draft_with_http_info(object_id, revision_id, opts = {}) ⇒ Array<(BlogPost, Integer, Hash)>
Restore a previous version of a blog post, to the draft version of the blog post Takes a specified version of a blog post, sets it as the new draft version of the blog post.
-
#restore_previous_version_with_http_info(object_id, revision_id, opts = {}) ⇒ Array<(BlogPost, Integer, Hash)>
Restore a previous version of a blog post Takes a specified version of a blog post and restores it.
-
#schedule(content_schedule_request_v_next, opts = {}) ⇒ nil
Schedule a Blog Post to be Published Schedule a Blog Post to be Published.
-
#schedule_with_http_info(content_schedule_request_v_next, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Schedule a Blog Post to be Published Schedule a Blog Post to be Published.
-
#set_lang_primary(set_new_language_primary_request_v_next, opts = {}) ⇒ nil
Set a new primary language Set the primary language of a multi-language group to the language of the provided post (specified as an id in the request body).
-
#set_lang_primary_with_http_info(set_new_language_primary_request_v_next, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Set a new primary language Set the primary language of a multi-language group to the language of the provided post (specified as an id in the request body).
-
#update(object_id, blog_post, opts = {}) ⇒ BlogPost
Update a Blog Post Sparse updates a single Blog Post object identified by the id in the path.
-
#update_batch(batch_input_json_node, opts = {}) ⇒ BatchResponseBlogPost
Update a batch of Blog Posts Update the Blog Post objects identified in the request body.
-
#update_batch_with_http_info(batch_input_json_node, opts = {}) ⇒ Array<(BatchResponseBlogPost, Integer, Hash)>
Update a batch of Blog Posts Update the Blog Post objects identified in the request body.
-
#update_draft(object_id, blog_post, opts = {}) ⇒ BlogPost
Update a Blog Post draft Sparse updates the draft version of a single Blog Post object identified by the id in the path.
-
#update_draft_with_http_info(object_id, blog_post, opts = {}) ⇒ Array<(BlogPost, Integer, Hash)>
Update a Blog Post draft Sparse updates the draft version of a single Blog Post object identified by the id in the path.
-
#update_langs(update_languages_request_v_next, opts = {}) ⇒ nil
Update languages of multi-language group Explicitly set new languages for each Blog Post in a multi-language group.
-
#update_langs_with_http_info(update_languages_request_v_next, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Update languages of multi-language group Explicitly set new languages for each Blog Post in a multi-language group.
-
#update_with_http_info(object_id, blog_post, opts = {}) ⇒ Array<(BlogPost, Integer, Hash)>
Update a Blog Post Sparse updates a single Blog Post object identified by the id in the path.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ BlogPostsApi
Returns a new instance of BlogPostsApi.
22 23 24 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 22 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
20 21 22 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 20 def api_client @api_client end |
Instance Method Details
#archive(object_id, opts = {}) ⇒ nil
Delete a Blog Post Delete the Blog Post object identified by the id in the path.
31 32 33 34 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 31 def archive(object_id, opts = {}) archive_with_http_info(object_id, opts) nil end |
#archive_batch(batch_input_string, opts = {}) ⇒ nil
Delete a batch of Blog Posts Delete the Blog Post objects identified in the request body. Note: This is not the same as the in-app ‘archive` function. To perform a dashboard `archive` send an normal update with the `archivedInDashboard` field set to true.
96 97 98 99 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 96 def archive_batch(batch_input_string, opts = {}) archive_batch_with_http_info(batch_input_string, opts) nil end |
#archive_batch_with_http_info(batch_input_string, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a batch of Blog Posts Delete the Blog Post objects identified in the request body. Note: This is not the same as the in-app `archive` function. To perform a dashboard `archive` send an normal update with the `archivedInDashboard` field set to true.
106 107 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 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 106 def archive_batch_with_http_info(batch_input_string, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.archive_batch ...' end # verify the required parameter 'batch_input_string' is set if @api_client.config.client_side_validation && batch_input_string.nil? fail ArgumentError, "Missing the required parameter 'batch_input_string' when calling BlogPostsApi.archive_batch" end # resource path local_var_path = '/cms/v3/blogs/posts/batch/archive' # 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(['*/*']) # 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(batch_input_string) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.archive_batch", :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: BlogPostsApi#archive_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#archive_with_http_info(object_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a Blog Post Delete the Blog Post object identified by the id in the path.
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/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 42 def archive_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.archive ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling BlogPostsApi.archive" end # resource path local_var_path = '/cms/v3/blogs/posts/{objectId}'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.archive", :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: BlogPostsApi#archive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#attach_to_lang_group(attach_to_lang_primary_request_v_next, opts = {}) ⇒ nil
Attach a Blog Post to a multi-language group Attach a Blog Post to a multi-language group.
164 165 166 167 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 164 def attach_to_lang_group(attach_to_lang_primary_request_v_next, opts = {}) attach_to_lang_group_with_http_info(attach_to_lang_primary_request_v_next, opts) nil end |
#attach_to_lang_group_with_http_info(attach_to_lang_primary_request_v_next, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Attach a Blog Post to a multi-language group Attach a Blog Post to a multi-language group.
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 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 174 def attach_to_lang_group_with_http_info(attach_to_lang_primary_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.attach_to_lang_group ...' end # verify the required parameter 'attach_to_lang_primary_request_v_next' is set if @api_client.config.client_side_validation && attach_to_lang_primary_request_v_next.nil? fail ArgumentError, "Missing the required parameter 'attach_to_lang_primary_request_v_next' when calling BlogPostsApi.attach_to_lang_group" end # resource path local_var_path = '/cms/v3/blogs/posts/multi-language/attach-to-lang-group' # 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(['*/*']) # 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(attach_to_lang_primary_request_v_next) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.attach_to_lang_group", :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: BlogPostsApi#attach_to_lang_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#clone(content_clone_request_v_next, opts = {}) ⇒ BlogPost
Clone a Blog Post Clone a Blog Post.
232 233 234 235 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 232 def clone(content_clone_request_v_next, opts = {}) data, _status_code, _headers = clone_with_http_info(content_clone_request_v_next, opts) data end |
#clone_with_http_info(content_clone_request_v_next, opts = {}) ⇒ Array<(BlogPost, Integer, Hash)>
Clone a Blog Post Clone a Blog Post.
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 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 242 def clone_with_http_info(content_clone_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.clone ...' end # verify the required parameter 'content_clone_request_v_next' is set if @api_client.config.client_side_validation && content_clone_request_v_next.nil? fail ArgumentError, "Missing the required parameter 'content_clone_request_v_next' when calling BlogPostsApi.clone" end # resource path local_var_path = '/cms/v3/blogs/posts/clone' # 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', '*/*']) # 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(content_clone_request_v_next) # return_type return_type = opts[:debug_return_type] || 'BlogPost' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.clone", :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: BlogPostsApi#clone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create(blog_post, opts = {}) ⇒ BlogPost
Create a new Blog Post Create a new Blog Post.
300 301 302 303 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 300 def create(blog_post, opts = {}) data, _status_code, _headers = create_with_http_info(blog_post, opts) data end |
#create_batch(batch_input_blog_post, opts = {}) ⇒ BatchResponseBlogPost
Create a batch of Blog Posts Create the Blog Post objects detailed in the request body.
368 369 370 371 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 368 def create_batch(batch_input_blog_post, opts = {}) data, _status_code, _headers = create_batch_with_http_info(batch_input_blog_post, opts) data end |
#create_batch_with_http_info(batch_input_blog_post, opts = {}) ⇒ Array<(BatchResponseBlogPost, Integer, Hash)>
Create a batch of Blog Posts Create the Blog Post objects detailed in the request body.
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 425 426 427 428 429 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 378 def create_batch_with_http_info(batch_input_blog_post, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.create_batch ...' end # verify the required parameter 'batch_input_blog_post' is set if @api_client.config.client_side_validation && batch_input_blog_post.nil? fail ArgumentError, "Missing the required parameter 'batch_input_blog_post' when calling BlogPostsApi.create_batch" end # resource path local_var_path = '/cms/v3/blogs/posts/batch/create' # 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', '*/*']) # 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(batch_input_blog_post) # return_type return_type = opts[:debug_return_type] || 'BatchResponseBlogPost' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.create_batch", :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: BlogPostsApi#create_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_lang_variation(blog_post_language_clone_request_v_next, opts = {}) ⇒ BlogPost
Create a new language variation Create a new language variation from an existing Blog Post
436 437 438 439 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 436 def create_lang_variation(blog_post_language_clone_request_v_next, opts = {}) data, _status_code, _headers = create_lang_variation_with_http_info(blog_post_language_clone_request_v_next, opts) data end |
#create_lang_variation_with_http_info(blog_post_language_clone_request_v_next, opts = {}) ⇒ Array<(BlogPost, Integer, Hash)>
Create a new language variation Create a new language variation from an existing Blog Post
446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 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 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 446 def create_lang_variation_with_http_info(blog_post_language_clone_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.create_lang_variation ...' end # verify the required parameter 'blog_post_language_clone_request_v_next' is set if @api_client.config.client_side_validation && blog_post_language_clone_request_v_next.nil? fail ArgumentError, "Missing the required parameter 'blog_post_language_clone_request_v_next' when calling BlogPostsApi.create_lang_variation" end # resource path local_var_path = '/cms/v3/blogs/posts/multi-language/create-language-variation' # 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', '*/*']) # 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(blog_post_language_clone_request_v_next) # return_type return_type = opts[:debug_return_type] || 'BlogPost' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.create_lang_variation", :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: BlogPostsApi#create_lang_variation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_with_http_info(blog_post, opts = {}) ⇒ Array<(BlogPost, Integer, Hash)>
Create a new Blog Post Create a new Blog Post.
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 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 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 310 def create_with_http_info(blog_post, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.create ...' end # verify the required parameter 'blog_post' is set if @api_client.config.client_side_validation && blog_post.nil? fail ArgumentError, "Missing the required parameter 'blog_post' when calling BlogPostsApi.create" end # resource path local_var_path = '/cms/v3/blogs/posts' # 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', '*/*']) # 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(blog_post) # return_type return_type = opts[:debug_return_type] || 'BlogPost' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.create", :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: BlogPostsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#detach_from_lang_group(detach_from_lang_group_request_v_next, opts = {}) ⇒ nil
Detach a Blog Post from a multi-language group Detach a Blog Post from a multi-language group.
504 505 506 507 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 504 def detach_from_lang_group(detach_from_lang_group_request_v_next, opts = {}) detach_from_lang_group_with_http_info(detach_from_lang_group_request_v_next, opts) nil end |
#detach_from_lang_group_with_http_info(detach_from_lang_group_request_v_next, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Detach a Blog Post from a multi-language group Detach a Blog Post from a multi-language group.
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 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 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 514 def detach_from_lang_group_with_http_info(detach_from_lang_group_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.detach_from_lang_group ...' end # verify the required parameter 'detach_from_lang_group_request_v_next' is set if @api_client.config.client_side_validation && detach_from_lang_group_request_v_next.nil? fail ArgumentError, "Missing the required parameter 'detach_from_lang_group_request_v_next' when calling BlogPostsApi.detach_from_lang_group" end # resource path local_var_path = '/cms/v3/blogs/posts/multi-language/detach-from-lang-group' # 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(['*/*']) # 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(detach_from_lang_group_request_v_next) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.detach_from_lang_group", :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: BlogPostsApi#detach_from_lang_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_by_id(object_id, opts = {}) ⇒ BlogPost
Retrieve a Blog Post Retrieve the Blog Post object identified by the id in the path.
574 575 576 577 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 574 def get_by_id(object_id, opts = {}) data, _status_code, _headers = get_by_id_with_http_info(object_id, opts) data end |
#get_by_id_with_http_info(object_id, opts = {}) ⇒ Array<(BlogPost, Integer, Hash)>
Retrieve a Blog Post Retrieve the Blog Post object identified by the id in the path.
586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 586 def get_by_id_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.get_by_id ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling BlogPostsApi.get_by_id" end # resource path local_var_path = '/cms/v3/blogs/posts/{objectId}'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil? query_params[:'property'] = opts[:'property'] if !opts[:'property'].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] || 'BlogPost' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.get_by_id", :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: BlogPostsApi#get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_draft_by_id(object_id, opts = {}) ⇒ BlogPost
Retrieve the full draft version of the Blog Post Retrieve the full draft version of the Blog Post.
641 642 643 644 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 641 def get_draft_by_id(object_id, opts = {}) data, _status_code, _headers = get_draft_by_id_with_http_info(object_id, opts) data end |
#get_draft_by_id_with_http_info(object_id, opts = {}) ⇒ Array<(BlogPost, Integer, Hash)>
Retrieve the full draft version of the Blog Post Retrieve the full draft version of the Blog Post.
651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 651 def get_draft_by_id_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.get_draft_by_id ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling BlogPostsApi.get_draft_by_id" end # resource path local_var_path = '/cms/v3/blogs/posts/{objectId}/draft'.sub('{' + 'objectId' + '}', CGI.escape(object_id.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', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BlogPost' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.get_draft_by_id", :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: BlogPostsApi#get_draft_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_page(opts = {}) ⇒ CollectionResponseWithTotalBlogPostForwardPaging
Get all Blog Posts Get the list of blog posts. Supports paging and filtering. This method would be useful for an integration that examined these models and used an external service to suggest edits.
714 715 716 717 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 714 def get_page(opts = {}) data, _status_code, _headers = get_page_with_http_info(opts) data end |
#get_page_with_http_info(opts = {}) ⇒ Array<(CollectionResponseWithTotalBlogPostForwardPaging, Integer, Hash)>
Get all Blog Posts Get the list of blog posts. Supports paging and filtering. This method would be useful for an integration that examined these models and used an external service to suggest edits.
734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 734 def get_page_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.get_page ...' end # resource path local_var_path = '/cms/v3/blogs/posts' # query parameters query_params = opts[:query_params] || {} query_params[:'createdAt'] = opts[:'created_at'] if !opts[:'created_at'].nil? query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil? query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil? query_params[:'updatedAt'] = opts[:'updated_at'] if !opts[:'updated_at'].nil? query_params[:'updatedAfter'] = opts[:'updated_after'] if !opts[:'updated_after'].nil? query_params[:'updatedBefore'] = opts[:'updated_before'] if !opts[:'updated_before'].nil? query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil? query_params[:'property'] = opts[:'property'] if !opts[:'property'].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] || 'CollectionResponseWithTotalBlogPostForwardPaging' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.get_page", :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: BlogPostsApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_previous_version(object_id, revision_id, opts = {}) ⇒ VersionBlogPost
Retrieves a previous version of a blog post Retrieves a previous version of a blog post.
795 796 797 798 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 795 def get_previous_version(object_id, revision_id, opts = {}) data, _status_code, _headers = get_previous_version_with_http_info(object_id, revision_id, opts) data end |
#get_previous_version_with_http_info(object_id, revision_id, opts = {}) ⇒ Array<(VersionBlogPost, Integer, Hash)>
Retrieves a previous version of a blog post Retrieves a previous version of a blog post.
806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 806 def get_previous_version_with_http_info(object_id, revision_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.get_previous_version ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling BlogPostsApi.get_previous_version" end # verify the required parameter 'revision_id' is set if @api_client.config.client_side_validation && revision_id.nil? fail ArgumentError, "Missing the required parameter 'revision_id' when calling BlogPostsApi.get_previous_version" end # resource path local_var_path = '/cms/v3/blogs/posts/{objectId}/revisions/{revisionId}'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)).sub('{' + 'revisionId' + '}', CGI.escape(revision_id.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', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'VersionBlogPost' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.get_previous_version", :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: BlogPostsApi#get_previous_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_previous_versions(object_id, opts = {}) ⇒ CollectionResponseWithTotalVersionBlogPost
Retrieves all the previous versions of a blog post Retrieves all the previous versions of a blog post.
866 867 868 869 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 866 def get_previous_versions(object_id, opts = {}) data, _status_code, _headers = get_previous_versions_with_http_info(object_id, opts) data end |
#get_previous_versions_with_http_info(object_id, opts = {}) ⇒ Array<(CollectionResponseWithTotalVersionBlogPost, Integer, Hash)>
Retrieves all the previous versions of a blog post Retrieves all the previous versions of a blog post.
879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 879 def get_previous_versions_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.get_previous_versions ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling BlogPostsApi.get_previous_versions" end # resource path local_var_path = '/cms/v3/blogs/posts/{objectId}/revisions'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? 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', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CollectionResponseWithTotalVersionBlogPost' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.get_previous_versions", :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: BlogPostsApi#get_previous_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#push_live(object_id, opts = {}) ⇒ nil
Push Blog Post draft edits live Take any changes from the draft version of the Blog Post and apply them to the live version.
935 936 937 938 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 935 def push_live(object_id, opts = {}) push_live_with_http_info(object_id, opts) nil end |
#push_live_with_http_info(object_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Push Blog Post draft edits live Take any changes from the draft version of the Blog Post and apply them to the live version.
945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 945 def push_live_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.push_live ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling BlogPostsApi.push_live" end # resource path local_var_path = '/cms/v3/blogs/posts/{objectId}/draft/push-live'.sub('{' + 'objectId' + '}', CGI.escape(object_id.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(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.push_live", :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: BlogPostsApi#push_live\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#read_batch(batch_input_string, opts = {}) ⇒ BatchResponseBlogPost
Retrieve a batch of Blog Posts Retrieve the Blog Post objects identified in the request body.
999 1000 1001 1002 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 999 def read_batch(batch_input_string, opts = {}) data, _status_code, _headers = read_batch_with_http_info(batch_input_string, opts) data end |
#read_batch_with_http_info(batch_input_string, opts = {}) ⇒ Array<(BatchResponseBlogPost, Integer, Hash)>
Retrieve a batch of Blog Posts Retrieve the Blog Post objects identified in the request body.
1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1010 def read_batch_with_http_info(batch_input_string, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.read_batch ...' end # verify the required parameter 'batch_input_string' is set if @api_client.config.client_side_validation && batch_input_string.nil? fail ArgumentError, "Missing the required parameter 'batch_input_string' when calling BlogPostsApi.read_batch" end # resource path local_var_path = '/cms/v3/blogs/posts/batch/read' # query parameters query_params = opts[:query_params] || {} query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # 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(batch_input_string) # return_type return_type = opts[:debug_return_type] || 'BatchResponseBlogPost' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.read_batch", :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: BlogPostsApi#read_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reset_draft(object_id, opts = {}) ⇒ nil
Reset the Blog Post draft to the live version Discards any edits and resets the draft to the live version.
1069 1070 1071 1072 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1069 def reset_draft(object_id, opts = {}) reset_draft_with_http_info(object_id, opts) nil end |
#reset_draft_with_http_info(object_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Reset the Blog Post draft to the live version Discards any edits and resets the draft to the live version.
1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1079 def reset_draft_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.reset_draft ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling BlogPostsApi.reset_draft" end # resource path local_var_path = '/cms/v3/blogs/posts/{objectId}/draft/reset'.sub('{' + 'objectId' + '}', CGI.escape(object_id.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(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.reset_draft", :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: BlogPostsApi#reset_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#restore_previous_version(object_id, revision_id, opts = {}) ⇒ BlogPost
Restore a previous version of a blog post Takes a specified version of a blog post and restores it.
1133 1134 1135 1136 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1133 def restore_previous_version(object_id, revision_id, opts = {}) data, _status_code, _headers = restore_previous_version_with_http_info(object_id, revision_id, opts) data end |
#restore_previous_version_to_draft(object_id, revision_id, opts = {}) ⇒ BlogPost
Restore a previous version of a blog post, to the draft version of the blog post Takes a specified version of a blog post, sets it as the new draft version of the blog post.
1202 1203 1204 1205 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1202 def restore_previous_version_to_draft(object_id, revision_id, opts = {}) data, _status_code, _headers = restore_previous_version_to_draft_with_http_info(object_id, revision_id, opts) data end |
#restore_previous_version_to_draft_with_http_info(object_id, revision_id, opts = {}) ⇒ Array<(BlogPost, Integer, Hash)>
Restore a previous version of a blog post, to the draft version of the blog post Takes a specified version of a blog post, sets it as the new draft version of the blog post.
1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1213 def restore_previous_version_to_draft_with_http_info(object_id, revision_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.restore_previous_version_to_draft ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling BlogPostsApi.restore_previous_version_to_draft" end # verify the required parameter 'revision_id' is set if @api_client.config.client_side_validation && revision_id.nil? fail ArgumentError, "Missing the required parameter 'revision_id' when calling BlogPostsApi.restore_previous_version_to_draft" end # resource path local_var_path = '/cms/v3/blogs/posts/{objectId}/revisions/{revisionId}/restore-to-draft'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)).sub('{' + 'revisionId' + '}', CGI.escape(revision_id.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', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BlogPost' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.restore_previous_version_to_draft", :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: BlogPostsApi#restore_previous_version_to_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#restore_previous_version_with_http_info(object_id, revision_id, opts = {}) ⇒ Array<(BlogPost, Integer, Hash)>
Restore a previous version of a blog post Takes a specified version of a blog post and restores it.
1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1144 def restore_previous_version_with_http_info(object_id, revision_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.restore_previous_version ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling BlogPostsApi.restore_previous_version" end # verify the required parameter 'revision_id' is set if @api_client.config.client_side_validation && revision_id.nil? fail ArgumentError, "Missing the required parameter 'revision_id' when calling BlogPostsApi.restore_previous_version" end # resource path local_var_path = '/cms/v3/blogs/posts/{objectId}/revisions/{revisionId}/restore'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)).sub('{' + 'revisionId' + '}', CGI.escape(revision_id.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', '*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BlogPost' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.restore_previous_version", :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: BlogPostsApi#restore_previous_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#schedule(content_schedule_request_v_next, opts = {}) ⇒ nil
Schedule a Blog Post to be Published Schedule a Blog Post to be Published.
1270 1271 1272 1273 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1270 def schedule(content_schedule_request_v_next, opts = {}) schedule_with_http_info(content_schedule_request_v_next, opts) nil end |
#schedule_with_http_info(content_schedule_request_v_next, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Schedule a Blog Post to be Published Schedule a Blog Post to be Published.
1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1280 def schedule_with_http_info(content_schedule_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.schedule ...' end # verify the required parameter 'content_schedule_request_v_next' is set if @api_client.config.client_side_validation && content_schedule_request_v_next.nil? fail ArgumentError, "Missing the required parameter 'content_schedule_request_v_next' when calling BlogPostsApi.schedule" end # resource path local_var_path = '/cms/v3/blogs/posts/schedule' # 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(['*/*']) # 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(content_schedule_request_v_next) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.schedule", :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: BlogPostsApi#schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_lang_primary(set_new_language_primary_request_v_next, opts = {}) ⇒ nil
Set a new primary language Set the primary language of a multi-language group to the language of the provided post (specified as an id in the request body)
1338 1339 1340 1341 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1338 def set_lang_primary(set_new_language_primary_request_v_next, opts = {}) set_lang_primary_with_http_info(set_new_language_primary_request_v_next, opts) nil end |
#set_lang_primary_with_http_info(set_new_language_primary_request_v_next, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Set a new primary language Set the primary language of a multi-language group to the language of the provided post (specified as an id in the request body)
1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1348 def set_lang_primary_with_http_info(set_new_language_primary_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.set_lang_primary ...' end # verify the required parameter 'set_new_language_primary_request_v_next' is set if @api_client.config.client_side_validation && set_new_language_primary_request_v_next.nil? fail ArgumentError, "Missing the required parameter 'set_new_language_primary_request_v_next' when calling BlogPostsApi.set_lang_primary" end # resource path local_var_path = '/cms/v3/blogs/posts/multi-language/set-new-lang-primary' # 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(['*/*']) # 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(set_new_language_primary_request_v_next) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.set_lang_primary", :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: BlogPostsApi#set_lang_primary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update(object_id, blog_post, opts = {}) ⇒ BlogPost
Update a Blog Post Sparse updates a single Blog Post object identified by the id in the path. All the column values need not be specified. Only the that need to be modified can be specified.
1408 1409 1410 1411 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1408 def update(object_id, blog_post, opts = {}) data, _status_code, _headers = update_with_http_info(object_id, blog_post, opts) data end |
#update_batch(batch_input_json_node, opts = {}) ⇒ BatchResponseBlogPost
Update a batch of Blog Posts Update the Blog Post objects identified in the request body.
1484 1485 1486 1487 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1484 def update_batch(batch_input_json_node, opts = {}) data, _status_code, _headers = update_batch_with_http_info(batch_input_json_node, opts) data end |
#update_batch_with_http_info(batch_input_json_node, opts = {}) ⇒ Array<(BatchResponseBlogPost, Integer, Hash)>
Update a batch of Blog Posts Update the Blog Post objects identified in the request body.
1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1495 def update_batch_with_http_info(batch_input_json_node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.update_batch ...' end # verify the required parameter 'batch_input_json_node' is set if @api_client.config.client_side_validation && batch_input_json_node.nil? fail ArgumentError, "Missing the required parameter 'batch_input_json_node' when calling BlogPostsApi.update_batch" end # resource path local_var_path = '/cms/v3/blogs/posts/batch/update' # query parameters query_params = opts[:query_params] || {} query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # 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(batch_input_json_node) # return_type return_type = opts[:debug_return_type] || 'BatchResponseBlogPost' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.update_batch", :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: BlogPostsApi#update_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_draft(object_id, blog_post, opts = {}) ⇒ BlogPost
Update a Blog Post draft Sparse updates the draft version of a single Blog Post object identified by the id in the path. All the column values need not be specified. Only the that need to be modified can be specified.
1555 1556 1557 1558 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1555 def update_draft(object_id, blog_post, opts = {}) data, _status_code, _headers = update_draft_with_http_info(object_id, blog_post, opts) data end |
#update_draft_with_http_info(object_id, blog_post, opts = {}) ⇒ Array<(BlogPost, Integer, Hash)>
Update a Blog Post draft Sparse updates the draft version of a single Blog Post object identified by the id in the path. All the column values need not be specified. Only the that need to be modified can be specified.
1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1566 def update_draft_with_http_info(object_id, blog_post, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.update_draft ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling BlogPostsApi.update_draft" end # verify the required parameter 'blog_post' is set if @api_client.config.client_side_validation && blog_post.nil? fail ArgumentError, "Missing the required parameter 'blog_post' when calling BlogPostsApi.update_draft" end # resource path local_var_path = '/cms/v3/blogs/posts/{objectId}/draft'.sub('{' + 'objectId' + '}', CGI.escape(object_id.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', '*/*']) # 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(blog_post) # return_type return_type = opts[:debug_return_type] || 'BlogPost' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.update_draft", :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(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BlogPostsApi#update_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_langs(update_languages_request_v_next, opts = {}) ⇒ nil
Update languages of multi-language group Explicitly set new languages for each Blog Post in a multi-language group.
1628 1629 1630 1631 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1628 def update_langs(update_languages_request_v_next, opts = {}) update_langs_with_http_info(update_languages_request_v_next, opts) nil end |
#update_langs_with_http_info(update_languages_request_v_next, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Update languages of multi-language group Explicitly set new languages for each Blog Post in a multi-language group.
1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1638 def update_langs_with_http_info(update_languages_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.update_langs ...' end # verify the required parameter 'update_languages_request_v_next' is set if @api_client.config.client_side_validation && update_languages_request_v_next.nil? fail ArgumentError, "Missing the required parameter 'update_languages_request_v_next' when calling BlogPostsApi.update_langs" end # resource path local_var_path = '/cms/v3/blogs/posts/multi-language/update-languages' # 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(['*/*']) # 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(update_languages_request_v_next) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.update_langs", :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: BlogPostsApi#update_langs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_with_http_info(object_id, blog_post, opts = {}) ⇒ Array<(BlogPost, Integer, Hash)>
Update a Blog Post Sparse updates a single Blog Post object identified by the id in the path. All the column values need not be specified. Only the that need to be modified can be specified.
1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 |
# File 'lib/hubspot/codegen/cms/blogs/blog_posts/api/blog_posts_api.rb', line 1420 def update_with_http_info(object_id, blog_post, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogPostsApi.update ...' end # verify the required parameter 'object_id' is set if @api_client.config.client_side_validation && object_id.nil? fail ArgumentError, "Missing the required parameter 'object_id' when calling BlogPostsApi.update" end # verify the required parameter 'blog_post' is set if @api_client.config.client_side_validation && blog_post.nil? fail ArgumentError, "Missing the required parameter 'blog_post' when calling BlogPostsApi.update" end # resource path local_var_path = '/cms/v3/blogs/posts/{objectId}'.sub('{' + 'objectId' + '}', CGI.escape(object_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*']) # 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(blog_post) # return_type return_type = opts[:debug_return_type] || 'BlogPost' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"BlogPostsApi.update", :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(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BlogPostsApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |