Class: Hubspot::Cms::Blogs::Authors::BlogAuthorsApi
- Inherits:
-
Object
- Object
- Hubspot::Cms::Blogs::Authors::BlogAuthorsApi
- Defined in:
- lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_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 Author Delete the Blog Author object identified by the id in the path.
-
#archive_batch(batch_input_string, opts = {}) ⇒ nil
Delete a batch of Blog Authors Delete the Blog Author objects identified in the request body.
-
#archive_batch_with_http_info(batch_input_string, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a batch of Blog Authors Delete the Blog Author objects identified in the request body.
-
#archive_with_http_info(object_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a Blog Author Delete the Blog Author object identified by the id in the path.
-
#attach_to_lang_group(attach_to_lang_primary_request_v_next, opts = {}) ⇒ Error
Attach a Blog Author to a multi-language group Attach a Blog Author to a multi-language group.
-
#attach_to_lang_group_with_http_info(attach_to_lang_primary_request_v_next, opts = {}) ⇒ Array<(Error, Integer, Hash)>
Attach a Blog Author to a multi-language group Attach a Blog Author to a multi-language group.
-
#create(blog_author, opts = {}) ⇒ BlogAuthor
Create a new Blog Author Create a new Blog Author.
-
#create_batch(batch_input_blog_author, opts = {}) ⇒ BatchResponseBlogAuthor
Create a batch of Blog Authors Create the Blog Author objects detailed in the request body.
-
#create_batch_with_http_info(batch_input_blog_author, opts = {}) ⇒ Array<(BatchResponseBlogAuthor, Integer, Hash)>
Create a batch of Blog Authors Create the Blog Author objects detailed in the request body.
-
#create_lang_variation(blog_author_clone_request_v_next, opts = {}) ⇒ BlogAuthor
Create a new language variation Create a new language variation from an existing Blog Author.
-
#create_lang_variation_with_http_info(blog_author_clone_request_v_next, opts = {}) ⇒ Array<(BlogAuthor, Integer, Hash)>
Create a new language variation Create a new language variation from an existing Blog Author.
-
#create_with_http_info(blog_author, opts = {}) ⇒ Array<(BlogAuthor, Integer, Hash)>
Create a new Blog Author Create a new Blog Author.
-
#detach_from_lang_group(detach_from_lang_group_request_v_next, opts = {}) ⇒ Error
Detach a Blog Author from a multi-language group Detach a Blog Author from a multi-language group.
-
#detach_from_lang_group_with_http_info(detach_from_lang_group_request_v_next, opts = {}) ⇒ Array<(Error, Integer, Hash)>
Detach a Blog Author from a multi-language group Detach a Blog Author from a multi-language group.
-
#get_by_id(object_id, opts = {}) ⇒ BlogAuthor
Retrieve a Blog Author Retrieve the Blog Author object identified by the id in the path.
-
#get_by_id_with_http_info(object_id, opts = {}) ⇒ Array<(BlogAuthor, Integer, Hash)>
Retrieve a Blog Author Retrieve the Blog Author object identified by the id in the path.
-
#get_page(opts = {}) ⇒ CollectionResponseWithTotalBlogAuthorForwardPaging
Get all Blog Authors Get the list of blog authors.
-
#get_page_with_http_info(opts = {}) ⇒ Array<(CollectionResponseWithTotalBlogAuthorForwardPaging, Integer, Hash)>
Get all Blog Authors Get the list of blog authors.
-
#initialize(api_client = ApiClient.default) ⇒ BlogAuthorsApi
constructor
A new instance of BlogAuthorsApi.
-
#read_batch(batch_input_string, opts = {}) ⇒ BatchResponseBlogAuthor
Retrieve a batch of Blog Authors Retrieve the Blog Author objects identified in the request body.
-
#read_batch_with_http_info(batch_input_string, opts = {}) ⇒ Array<(BatchResponseBlogAuthor, Integer, Hash)>
Retrieve a batch of Blog Authors Retrieve the Blog Author objects identified in the request body.
-
#set_lang_primary(set_new_language_primary_request_v_next, opts = {}) ⇒ nil
Set a new primary language Set a Blog Author as the primary language of a multi-language group.
-
#set_lang_primary_with_http_info(set_new_language_primary_request_v_next, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Set a new primary language Set a Blog Author as the primary language of a multi-language group.
-
#update(object_id, blog_author, opts = {}) ⇒ BlogAuthor
Update a Blog Author Sparse updates a single Blog Author object identified by the id in the path.
-
#update_batch(batch_input_json_node, opts = {}) ⇒ BatchResponseBlogAuthor
Update a batch of Blog Authors Update the Blog Author objects identified in the request body.
-
#update_batch_with_http_info(batch_input_json_node, opts = {}) ⇒ Array<(BatchResponseBlogAuthor, Integer, Hash)>
Update a batch of Blog Authors Update the Blog Author objects identified in the request body.
-
#update_langs(update_languages_request_v_next, opts = {}) ⇒ Error
Update languages of multi-language group Explicitly set new languages for each Blog Author in a multi-language group.
-
#update_langs_with_http_info(update_languages_request_v_next, opts = {}) ⇒ Array<(Error, Integer, Hash)>
Update languages of multi-language group Explicitly set new languages for each Blog Author in a multi-language group.
-
#update_with_http_info(object_id, blog_author, opts = {}) ⇒ Array<(BlogAuthor, Integer, Hash)>
Update a Blog Author Sparse updates a single Blog Author object identified by the id in the path.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ BlogAuthorsApi
Returns a new instance of BlogAuthorsApi.
22 23 24 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_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/authors/api/blog_authors_api.rb', line 20 def api_client @api_client end |
Instance Method Details
#archive(object_id, opts = {}) ⇒ nil
Delete a Blog Author Delete the Blog Author object identified by the id in the path.
31 32 33 34 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_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 Authors Delete the Blog Author objects identified in the request body.
95 96 97 98 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 95 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 Authors Delete the Blog Author objects identified in the request body.
105 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 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_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: BlogAuthorsApi.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 BlogAuthorsApi.archive_batch" end # resource path local_var_path = '/cms/v3/blogs/authors/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'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BlogAuthorsApi#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 Author Delete the Blog Author 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 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 42 def archive_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogAuthorsApi.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 BlogAuthorsApi.archive" end # resource path local_var_path = '/cms/v3/blogs/authors/{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'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BlogAuthorsApi#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 = {}) ⇒ Error
Attach a Blog Author to a multi-language group Attach a Blog Author to a multi-language group.
159 160 161 162 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 159 def attach_to_lang_group(attach_to_lang_primary_request_v_next, opts = {}) data, _status_code, _headers = attach_to_lang_group_with_http_info(attach_to_lang_primary_request_v_next, opts) data end |
#attach_to_lang_group_with_http_info(attach_to_lang_primary_request_v_next, opts = {}) ⇒ Array<(Error, Integer, Hash)>
Attach a Blog Author to a multi-language group Attach a Blog Author to a multi-language group.
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 169 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: BlogAuthorsApi.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 BlogAuthorsApi.attach_to_lang_group" end # resource path local_var_path = '/cms/v3/blogs/authors/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' 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(attach_to_lang_primary_request_v_next) # return_type return_type = opts[:return_type] || 'Error' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BlogAuthorsApi#attach_to_lang_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create(blog_author, opts = {}) ⇒ BlogAuthor
Create a new Blog Author Create a new Blog Author.
223 224 225 226 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 223 def create(, opts = {}) data, _status_code, _headers = create_with_http_info(, opts) data end |
#create_batch(batch_input_blog_author, opts = {}) ⇒ BatchResponseBlogAuthor
Create a batch of Blog Authors Create the Blog Author objects detailed in the request body.
287 288 289 290 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 287 def create_batch(, opts = {}) data, _status_code, _headers = create_batch_with_http_info(, opts) data end |
#create_batch_with_http_info(batch_input_blog_author, opts = {}) ⇒ Array<(BatchResponseBlogAuthor, Integer, Hash)>
Create a batch of Blog Authors Create the Blog Author objects detailed in the request body.
297 298 299 300 301 302 303 304 305 306 307 308 309 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 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 297 def create_batch_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogAuthorsApi.create_batch ...' end # verify the required parameter 'batch_input_blog_author' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'batch_input_blog_author' when calling BlogAuthorsApi.create_batch" end # resource path local_var_path = '/cms/v3/blogs/authors/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() # return_type return_type = opts[:return_type] || 'BatchResponseBlogAuthor' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BlogAuthorsApi#create_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_lang_variation(blog_author_clone_request_v_next, opts = {}) ⇒ BlogAuthor
Create a new language variation Create a new language variation from an existing Blog Author.
351 352 353 354 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 351 def create_lang_variation(, opts = {}) data, _status_code, _headers = create_lang_variation_with_http_info(, opts) data end |
#create_lang_variation_with_http_info(blog_author_clone_request_v_next, opts = {}) ⇒ Array<(BlogAuthor, Integer, Hash)>
Create a new language variation Create a new language variation from an existing Blog Author.
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 361 def create_lang_variation_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogAuthorsApi.create_lang_variation ...' end # verify the required parameter 'blog_author_clone_request_v_next' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'blog_author_clone_request_v_next' when calling BlogAuthorsApi.create_lang_variation" end # resource path local_var_path = '/cms/v3/blogs/authors/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' 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() # return_type return_type = opts[:return_type] || 'BlogAuthor' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BlogAuthorsApi#create_lang_variation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_with_http_info(blog_author, opts = {}) ⇒ Array<(BlogAuthor, Integer, Hash)>
Create a new Blog Author Create a new Blog Author.
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 233 def create_with_http_info(, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogAuthorsApi.create ...' end # verify the required parameter 'blog_author' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'blog_author' when calling BlogAuthorsApi.create" end # resource path local_var_path = '/cms/v3/blogs/authors' # 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() # return_type return_type = opts[:return_type] || 'BlogAuthor' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BlogAuthorsApi#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 = {}) ⇒ Error
Detach a Blog Author from a multi-language group Detach a Blog Author from a multi-language group.
415 416 417 418 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 415 def detach_from_lang_group(detach_from_lang_group_request_v_next, opts = {}) data, _status_code, _headers = detach_from_lang_group_with_http_info(detach_from_lang_group_request_v_next, opts) data end |
#detach_from_lang_group_with_http_info(detach_from_lang_group_request_v_next, opts = {}) ⇒ Array<(Error, Integer, Hash)>
Detach a Blog Author from a multi-language group Detach a Blog Author from a multi-language group.
425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 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 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 425 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: BlogAuthorsApi.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 BlogAuthorsApi.detach_from_lang_group" end # resource path local_var_path = '/cms/v3/blogs/authors/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' 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(detach_from_lang_group_request_v_next) # return_type return_type = opts[:return_type] || 'Error' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BlogAuthorsApi#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 = {}) ⇒ BlogAuthor
Retrieve a Blog Author Retrieve the Blog Author object identified by the id in the path.
480 481 482 483 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 480 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<(BlogAuthor, Integer, Hash)>
Retrieve a Blog Author Retrieve the Blog Author object identified by the id in the path.
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 491 def get_by_id_with_http_info(object_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogAuthorsApi.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 BlogAuthorsApi.get_by_id" end # resource path local_var_path = '/cms/v3/blogs/authors/{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] || 'BlogAuthor' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BlogAuthorsApi#get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_page(opts = {}) ⇒ CollectionResponseWithTotalBlogAuthorForwardPaging
Get all Blog Authors Get the list of blog authors. Supports paging and filtering. This method would be useful for an integration that examined these models and used an external service to suggest edits.
553 554 555 556 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 553 def get_page(opts = {}) data, _status_code, _headers = get_page_with_http_info(opts) data end |
#get_page_with_http_info(opts = {}) ⇒ Array<(CollectionResponseWithTotalBlogAuthorForwardPaging, Integer, Hash)>
Get all Blog Authors Get the list of blog authors. Supports paging and filtering. This method would be useful for an integration that examined these models and used an external service to suggest edits.
572 573 574 575 576 577 578 579 580 581 582 583 584 585 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 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 572 def get_page_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogAuthorsApi.get_page ...' end # resource path local_var_path = '/cms/v3/blogs/authors' # 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] || 'CollectionResponseWithTotalBlogAuthorForwardPaging' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BlogAuthorsApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#read_batch(batch_input_string, opts = {}) ⇒ BatchResponseBlogAuthor
Retrieve a batch of Blog Authors Retrieve the Blog Author objects identified in the request body.
631 632 633 634 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 631 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<(BatchResponseBlogAuthor, Integer, Hash)>
Retrieve a batch of Blog Authors Retrieve the Blog Author objects identified in the request body.
642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 642 def read_batch_with_http_info(batch_input_string, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogAuthorsApi.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 BlogAuthorsApi.read_batch" end # resource path local_var_path = '/cms/v3/blogs/authors/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] || 'BatchResponseBlogAuthor' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BlogAuthorsApi#read_batch\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 a Blog Author as the primary language of a multi-language group.
697 698 699 700 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 697 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 a Blog Author as the primary language of a multi-language group.
707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 707 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: BlogAuthorsApi.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 BlogAuthorsApi.set_lang_primary" end # resource path local_var_path = '/cms/v3/blogs/authors/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' 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(set_new_language_primary_request_v_next) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] = 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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BlogAuthorsApi#set_lang_primary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update(object_id, blog_author, opts = {}) ⇒ BlogAuthor
Update a Blog Author Sparse updates a single Blog Author 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.
763 764 765 766 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 763 def update(object_id, , opts = {}) data, _status_code, _headers = update_with_http_info(object_id, , opts) data end |
#update_batch(batch_input_json_node, opts = {}) ⇒ BatchResponseBlogAuthor
Update a batch of Blog Authors Update the Blog Author objects identified in the request body.
835 836 837 838 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 835 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<(BatchResponseBlogAuthor, Integer, Hash)>
Update a batch of Blog Authors Update the Blog Author objects identified in the request body.
846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 846 def update_batch_with_http_info(batch_input_json_node, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogAuthorsApi.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 BlogAuthorsApi.update_batch" end # resource path local_var_path = '/cms/v3/blogs/authors/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] || 'BatchResponseBlogAuthor' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BlogAuthorsApi#update_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_langs(update_languages_request_v_next, opts = {}) ⇒ Error
Update languages of multi-language group Explicitly set new languages for each Blog Author in a multi-language group.
901 902 903 904 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 901 def update_langs(update_languages_request_v_next, opts = {}) data, _status_code, _headers = update_langs_with_http_info(update_languages_request_v_next, opts) data end |
#update_langs_with_http_info(update_languages_request_v_next, opts = {}) ⇒ Array<(Error, Integer, Hash)>
Update languages of multi-language group Explicitly set new languages for each Blog Author in a multi-language group.
911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 911 def update_langs_with_http_info(update_languages_request_v_next, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogAuthorsApi.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 BlogAuthorsApi.update_langs" end # resource path local_var_path = '/cms/v3/blogs/authors/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' 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(update_languages_request_v_next) # return_type return_type = opts[:return_type] || 'Error' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BlogAuthorsApi#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_author, opts = {}) ⇒ Array<(BlogAuthor, Integer, Hash)>
Update a Blog Author Sparse updates a single Blog Author 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.
775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 |
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 775 def update_with_http_info(object_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BlogAuthorsApi.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 BlogAuthorsApi.update" end # verify the required parameter 'blog_author' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'blog_author' when calling BlogAuthorsApi.update" end # resource path local_var_path = '/cms/v3/blogs/authors/{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() # return_type return_type = opts[:return_type] || 'BlogAuthor' # auth_names auth_names = opts[:auth_names] || ['hapikey', 'oauth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BlogAuthorsApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |