class Hubspot::Cms::Blogs::BlogPosts::DefaultApi
Attributes
Public Class Methods
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 22 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Delete a Blog Post Delete the Blog Post object identified by the id in the path. @param object_id [String] The Blog Post id. @param [Hash] opts the optional parameters @option opts [Boolean] :archived Whether to return only results that have been archived. @return [nil]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 31 def archive(object_id, opts = {}) archive_with_http_info(object_id, opts) nil end
Archive 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 an in-app `archive` send an normal update with the `archived` field set to true. @param batch_input_string [BatchInputString] The JSON array of Blog Post ids. @param [Hash] opts the optional parameters @return [nil]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 95 def archive_batch(batch_input_string, opts = {}) archive_batch_with_http_info(batch_input_string, opts) nil end
Archive 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 an in-app `archive` send an normal update with the `archived` field set to true. @param batch_input_string [BatchInputString] The JSON array of Blog Post ids. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 105 def archive_batch_with_http_info(batch_input_string, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.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 DefaultApi.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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(batch_input_string) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#archive_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete a Blog Post Delete the Blog Post object identified by the id in the path. @param object_id [String] The Blog Post id. @param [Hash] opts the optional parameters @option opts [Boolean] :archived Whether to return only results that have been archived. @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 42 def archive_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.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 DefaultApi.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[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#archive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Clone a Blog Post Clone a Blog. @param content_clone_request_v_next [ContentCloneRequestVNext] The JSON representation of the ContentCloneRequest object. @param [Hash] opts the optional parameters @return [BlogPost]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 159 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 a Blog Post Clone a Blog. @param content_clone_request_v_next [ContentCloneRequestVNext] The JSON representation of the ContentCloneRequest object. @param [Hash] opts the optional parameters @return [Array<(BlogPost
, Integer, Hash)>] BlogPost
data, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 169 def clone_with_http_info(content_clone_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.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 DefaultApi.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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(content_clone_request_v_next) # return_type return_type = opts[:return_type] || 'BlogPost' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#clone\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a new Blog Post Create a new Blog Post. @param blog_post [BlogPost] The JSON representation of a new Blog Post. @param [Hash] opts the optional parameters @return [BlogPost]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 223 def create(blog_post, opts = {}) data, _status_code, _headers = create_with_http_info(blog_post, opts) data end
Create a batch of Blog Posts Create the Blog Post objects detailed in the request body. @param batch_input_blog_post [BatchInputBlogPost] The JSON array of new Blog Posts to create. @param [Hash] opts the optional parameters @return [Object]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 287 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 a batch of Blog Posts Create the Blog Post objects detailed in the request body. @param batch_input_blog_post [BatchInputBlogPost] The JSON array of new Blog Posts to create. @param [Hash] opts the optional parameters @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 297 def create_batch_with_http_info(batch_input_blog_post, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.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 DefaultApi.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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(batch_input_blog_post) # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#create_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a new Blog Post Create a new Blog Post. @param blog_post [BlogPost] The JSON representation of a new Blog Post. @param [Hash] opts the optional parameters @return [Array<(BlogPost
, Integer, Hash)>] BlogPost
data, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 233 def create_with_http_info(blog_post, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.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 DefaultApi.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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(blog_post) # return_type return_type = opts[:return_type] || 'BlogPost' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieve a Blog Post Retrieve the Blog Post object identified by the id in the path. @param object_id [String] The Blog Post id. @param [Hash] opts the optional parameters @option opts [Boolean] :archived Specifies whether to return archived Blog Posts. Defaults to `false`. @return [BlogPost]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 352 def get_by_id(object_id, opts = {}) data, _status_code, _headers = get_by_id_with_http_info(object_id, opts) data end
Retrieve a Blog Post Retrieve the Blog Post object identified by the id in the path. @param object_id [String] The Blog Post id. @param [Hash] opts the optional parameters @option opts [Boolean] :archived Specifies whether to return archived Blog Posts. Defaults to `false`. @return [Array<(BlogPost
, Integer, Hash)>] BlogPost
data, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 363 def get_by_id_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.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 DefaultApi.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? # 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[:body] # return_type return_type = opts[:return_type] || 'BlogPost' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieve the full draft version of the Blog Post Retrieve the full draft version of the Blog Post. @param object_id [String] The Blog Post id. @param [Hash] opts the optional parameters @return [BlogPost]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 416 def get_draft_by_id(object_id, opts = {}) data, _status_code, _headers = get_draft_by_id_with_http_info(object_id, opts) data end
Retrieve the full draft version of the Blog Post Retrieve the full draft version of the Blog Post. @param object_id [String] The Blog Post id. @param [Hash] opts the optional parameters @return [Array<(BlogPost
, Integer, Hash)>] BlogPost
data, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 426 def get_draft_by_id_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.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 DefaultApi.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[:body] # return_type return_type = opts[:return_type] || 'BlogPost' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_draft_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
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. @param [Hash] opts the optional parameters @option opts [DateTime] :created_at Only return Blog Posts created at exactly the specified time. @option opts [DateTime] :created_after Only return Blog Posts created after the specified time. @option opts [DateTime] :created_before Only return Blog Posts created before the specified time. @option opts [DateTime] :updated_at Only return Blog Posts last updated at exactly the specified time. @option opts [DateTime] :updated_after Only return Blog Posts last updated after the specified time. @option opts [DateTime] :updated_before Only return Blog Posts last updated before the specified time. @option opts [Array<String>] :sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. @option opts [Integer] :limit The maximum number of results to return. Default is 100. @option opts [Boolean] :archived Specifies whether to return archived Blog Posts. Defaults to `false`. @return [CollectionResponseWithTotalBlogPostForwardPaging]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 487 def get_page(opts = {}) data, _status_code, _headers = get_page_with_http_info(opts) data end
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. @param [Hash] opts the optional parameters @option opts [DateTime] :created_at Only return Blog Posts created at exactly the specified time. @option opts [DateTime] :created_after Only return Blog Posts created after the specified time. @option opts [DateTime] :created_before Only return Blog Posts created before the specified time. @option opts [DateTime] :updated_at Only return Blog Posts last updated at exactly the specified time. @option opts [DateTime] :updated_after Only return Blog Posts last updated after the specified time. @option opts [DateTime] :updated_before Only return Blog Posts last updated before the specified time. @option opts [Array<String>] :sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. @option opts [Integer] :limit The maximum number of results to return. Default is 100. @option opts [Boolean] :archived Specifies whether to return archived Blog Posts. Defaults to `false`. @return [Array<(CollectionResponseWithTotalBlogPostForwardPaging
, Integer, Hash)>] CollectionResponseWithTotalBlogPostForwardPaging
data, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 506 def get_page_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.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? # 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[:body] # return_type return_type = opts[:return_type] || 'CollectionResponseWithTotalBlogPostForwardPaging' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves a previous version of a blog post Retrieves a previous version of a blog post. @param object_id [String] The Blog Post id. @param revision_id [String] The Blog Post version id. @param [Hash] opts the optional parameters @return [VersionBlogPost]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 565 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
Retrieves a previous version of a blog post Retrieves a previous version of a blog post. @param object_id [String] The Blog Post id. @param revision_id [String] The Blog Post version id. @param [Hash] opts the optional parameters @return [Array<(VersionBlogPost
, Integer, Hash)>] VersionBlogPost
data, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 576 def get_previous_version_with_http_info(object_id, revision_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.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 DefaultApi.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 DefaultApi.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[:body] # return_type return_type = opts[:return_type] || 'VersionBlogPost' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_previous_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves all the previous versions of a blog post Retrieves all the previous versions of a blog post. @param object_id [String] The Blog Post id. @param [Hash] opts the optional parameters @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. @option opts [String] :before @option opts [Integer] :limit The maximum number of results to return. Default is 100. @return [CollectionResponseWithTotalVersionBlogPost]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 635 def get_previous_versions(object_id, opts = {}) data, _status_code, _headers = get_previous_versions_with_http_info(object_id, opts) data end
Retrieves all the previous versions of a blog post Retrieves all the previous versions of a blog post. @param object_id [String] The Blog Post id. @param [Hash] opts the optional parameters @option opts [String] :after The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results. @option opts [String] :before @option opts [Integer] :limit The maximum number of results to return. Default is 100. @return [Array<(CollectionResponseWithTotalVersionBlogPost
, Integer, Hash)>] CollectionResponseWithTotalVersionBlogPost
data, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 648 def get_previous_versions_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.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 DefaultApi.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[:body] # return_type return_type = opts[:return_type] || 'CollectionResponseWithTotalVersionBlogPost' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_previous_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Push Blog Post draft edits live Take any changes from the draft version of the Blog Post and apply them to the live version. @param object_id [String] The id of the Blog Post for which it's draft will be pushed live. @param [Hash] opts the optional parameters @return [nil]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 703 def push_live(object_id, opts = {}) push_live_with_http_info(object_id, opts) nil end
Push Blog Post draft edits live Take any changes from the draft version of the Blog Post and apply them to the live version. @param object_id [String] The id of the Blog Post for which it's draft will be pushed live. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 713 def push_live_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.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 DefaultApi.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[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#push_live\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieve a batch of Blog Posts Retrieve the Blog Post objects identified in the request body. @param batch_input_string [BatchInputString] The JSON array of Blog Post ids. @param [Hash] opts the optional parameters @option opts [Boolean] :archived Specifies whether to return archived Blog Posts. Defaults to `false`. @return [Object]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 766 def read_batch(batch_input_string, opts = {}) data, _status_code, _headers = read_batch_with_http_info(batch_input_string, opts) data end
Retrieve a batch of Blog Posts Retrieve the Blog Post objects identified in the request body. @param batch_input_string [BatchInputString] The JSON array of Blog Post ids. @param [Hash] opts the optional parameters @option opts [Boolean] :archived Specifies whether to return archived Blog Posts. Defaults to `false`. @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 777 def read_batch_with_http_info(batch_input_string, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.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 DefaultApi.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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(batch_input_string) # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#read_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Reset the Blog Post draft to the live version Discards any edits and resets the draft to the live version. @param object_id [String] The id of the Blog Post for which it's draft will be reset. @param [Hash] opts the optional parameters @return [nil]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 832 def reset_draft(object_id, opts = {}) reset_draft_with_http_info(object_id, opts) nil end
Reset the Blog Post draft to the live version Discards any edits and resets the draft to the live version. @param object_id [String] The id of the Blog Post for which it's draft will be reset. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 842 def reset_draft_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.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 DefaultApi.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[:body] # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#reset_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Restore a previous version of a blog post Takes a specified version of a blog post and restores it. @param object_id [String] The Blog Post id. @param revision_id [String] The Blog Post version id to restore. @param [Hash] opts the optional parameters @return [BlogPost]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 895 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 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. @param object_id [String] The Blog Post id. @param revision_id [Integer] The Blog Post version id to restore. @param [Hash] opts the optional parameters @return [BlogPost]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 963 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 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. @param object_id [String] The Blog Post id. @param revision_id [Integer] The Blog Post version id to restore. @param [Hash] opts the optional parameters @return [Array<(BlogPost
, Integer, Hash)>] BlogPost
data, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 974 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: DefaultApi.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 DefaultApi.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 DefaultApi.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[:body] # return_type return_type = opts[:return_type] || 'BlogPost' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#restore_previous_version_to_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Restore a previous version of a blog post Takes a specified version of a blog post and restores it. @param object_id [String] The Blog Post id. @param revision_id [String] The Blog Post version id to restore. @param [Hash] opts the optional parameters @return [Array<(BlogPost
, Integer, Hash)>] BlogPost
data, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 906 def restore_previous_version_with_http_info(object_id, revision_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.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 DefaultApi.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 DefaultApi.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[:body] # return_type return_type = opts[:return_type] || 'BlogPost' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#restore_previous_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Schedule a Blog Post to be Published Schedule a Blog Post to be Published. @param content_schedule_request_v_next [ContentScheduleRequestVNext] The JSON representation of the ContentCloneRequestVNext
object. @param [Hash] opts the optional parameters @return [nil]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 1030 def schedule(content_schedule_request_v_next, opts = {}) schedule_with_http_info(content_schedule_request_v_next, opts) nil end
Schedule a Blog Post to be Published Schedule a Blog Post to be Published. @param content_schedule_request_v_next [ContentScheduleRequestVNext] The JSON representation of the ContentCloneRequestVNext
object. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 1040 def schedule_with_http_info(content_schedule_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.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 DefaultApi.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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(content_schedule_request_v_next) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
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. @param object_id [String] The Blog Post id. @param blog_post [BlogPost] The JSON representation of the updated Blog Post. @param [Hash] opts the optional parameters @option opts [Boolean] :archived Specifies whether to update archived Blog Posts. Defaults to `false`. @return [BlogPost]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 1096 def update(object_id, blog_post, opts = {}) data, _status_code, _headers = update_with_http_info(object_id, blog_post, opts) data end
Update a batch of Blog Posts Update the Blog Post objects identified in the request body. @param batch_input_json_node [BatchInputJsonNode] @param [Hash] opts the optional parameters @option opts [Boolean] :archived Whether to return only results that have been archived. @return [Object]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 1168 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 a batch of Blog Posts Update the Blog Post objects identified in the request body. @param batch_input_json_node [BatchInputJsonNode] @param [Hash] opts the optional parameters @option opts [Boolean] :archived Whether to return only results that have been archived. @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 1179 def update_batch_with_http_info(batch_input_json_node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.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 DefaultApi.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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(batch_input_json_node) # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#update_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
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. @param object_id [String] The Blog Post id. @param blog_post [BlogPost] The JSON representation of the updated Blog Post to be applied to the draft. @param [Hash] opts the optional parameters @return [BlogPost]
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 1235 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 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. @param object_id [String] The Blog Post id. @param blog_post [BlogPost] The JSON representation of the updated Blog Post to be applied to the draft. @param [Hash] opts the optional parameters @return [Array<(BlogPost
, Integer, Hash)>] BlogPost
data, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 1246 def update_draft_with_http_info(object_id, blog_post, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.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 DefaultApi.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 DefaultApi.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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(blog_post) # return_type return_type = opts[:return_type] || 'BlogPost' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#update_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
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. @param object_id [String] The Blog Post id. @param blog_post [BlogPost] The JSON representation of the updated Blog Post. @param [Hash] opts the optional parameters @option opts [Boolean] :archived Specifies whether to update archived Blog Posts. Defaults to `false`. @return [Array<(BlogPost
, Integer, Hash)>] BlogPost
data, response status code and response headers
# File lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb, line 1108 def update_with_http_info(object_id, blog_post, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.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 DefaultApi.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 DefaultApi.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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(blog_post) # return_type return_type = opts[:return_type] || 'BlogPost' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] new_options = opts.merge( :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, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end