Class: Hubspot::Cms::Blogs::Authors::BlogAuthorsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_clientObject

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.

Parameters:

  • object_id (String)

    The Blog Author id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :archived (Boolean)

    Whether to return only results that have been archived.

Returns:

  • (nil)


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.

Parameters:

  • batch_input_string (BatchInputString)

    The JSON array of Blog Author ids.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


96
97
98
99
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 96

def archive_batch(batch_input_string, opts = {})
  archive_batch_with_http_info(batch_input_string, opts)
  nil
end

#archive_batch_with_http_info(batch_input_string, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a batch of Blog Authors Delete the Blog Author objects identified in the request body.

Parameters:

  • batch_input_string (BatchInputString)

    The JSON array of Blog Author ids.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 106

def archive_batch_with_http_info(batch_input_string, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: 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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_string)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"BlogAuthorsApi.archive_batch",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  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.

Parameters:

  • object_id (String)

    The Blog Author id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :archived (Boolean)

    Whether to return only results that have been archived.

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/hubspot/codegen/cms/blogs/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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"BlogAuthorsApi.archive",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  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 = {}) ⇒ nil

Attach a Blog Author to a multi-language group Attach a Blog Author to a multi-language group.

Parameters:

  • attach_to_lang_primary_request_v_next (AttachToLangPrimaryRequestVNext)

    The JSON representation of the AttachToLangPrimaryRequest object.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


164
165
166
167
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 164

def attach_to_lang_group(attach_to_lang_primary_request_v_next, opts = {})
  attach_to_lang_group_with_http_info(attach_to_lang_primary_request_v_next, opts)
  nil
end

#attach_to_lang_group_with_http_info(attach_to_lang_primary_request_v_next, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Attach a Blog Author to a multi-language group Attach a Blog Author to a multi-language group.

Parameters:

  • attach_to_lang_primary_request_v_next (AttachToLangPrimaryRequestVNext)

    The JSON representation of the AttachToLangPrimaryRequest object.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 174

def attach_to_lang_group_with_http_info(attach_to_lang_primary_request_v_next, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: 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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(attach_to_lang_primary_request_v_next)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"BlogAuthorsApi.attach_to_lang_group",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  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.

Parameters:

  • blog_author (BlogAuthor)

    The JSON representation of a new Blog Author.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



232
233
234
235
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 232

def create(blog_author, opts = {})
  data, _status_code, _headers = create_with_http_info(blog_author, 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.

Parameters:

  • batch_input_blog_author (BatchInputBlogAuthor)

    The JSON array of new Blog Authors to create.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



300
301
302
303
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 300

def create_batch(batch_input_blog_author, opts = {})
  data, _status_code, _headers = create_batch_with_http_info(batch_input_blog_author, 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.

Parameters:

  • batch_input_blog_author (BatchInputBlogAuthor)

    The JSON array of new Blog Authors to create.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(BatchResponseBlogAuthor, Integer, Hash)>)

    BatchResponseBlogAuthor data, response status code and response headers



310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 310

def create_batch_with_http_info(batch_input_blog_author, 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 && batch_input_blog_author.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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_blog_author)

  # return_type
  return_type = opts[:debug_return_type] || 'BatchResponseBlogAuthor'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"BlogAuthorsApi.create_batch",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  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.

Parameters:

  • blog_author_clone_request_v_next (BlogAuthorCloneRequestVNext)

    The JSON representation of the ContentLanguageCloneRequest object.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



368
369
370
371
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 368

def create_lang_variation(blog_author_clone_request_v_next, opts = {})
  data, _status_code, _headers = create_lang_variation_with_http_info(blog_author_clone_request_v_next, 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.

Parameters:

  • blog_author_clone_request_v_next (BlogAuthorCloneRequestVNext)

    The JSON representation of the ContentLanguageCloneRequest object.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(BlogAuthor, Integer, Hash)>)

    BlogAuthor data, response status code and response headers



378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 378

def create_lang_variation_with_http_info(blog_author_clone_request_v_next, 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 && blog_author_clone_request_v_next.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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(blog_author_clone_request_v_next)

  # return_type
  return_type = opts[:debug_return_type] || 'BlogAuthor'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"BlogAuthorsApi.create_lang_variation",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  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.

Parameters:

  • blog_author (BlogAuthor)

    The JSON representation of a new Blog Author.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(BlogAuthor, Integer, Hash)>)

    BlogAuthor data, response status code and response headers



242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 242

def create_with_http_info(blog_author, 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 && blog_author.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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(blog_author)

  # return_type
  return_type = opts[:debug_return_type] || 'BlogAuthor'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"BlogAuthorsApi.create",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  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 = {}) ⇒ nil

Detach a Blog Author from a multi-language group Detach a Blog Author from a multi-language group.

Parameters:

  • detach_from_lang_group_request_v_next (DetachFromLangGroupRequestVNext)

    The JSON representation of the DetachFromLangGroupRequest object.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


436
437
438
439
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 436

def detach_from_lang_group(detach_from_lang_group_request_v_next, opts = {})
  detach_from_lang_group_with_http_info(detach_from_lang_group_request_v_next, opts)
  nil
end

#detach_from_lang_group_with_http_info(detach_from_lang_group_request_v_next, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Detach a Blog Author from a multi-language group Detach a Blog Author from a multi-language group.

Parameters:

  • detach_from_lang_group_request_v_next (DetachFromLangGroupRequestVNext)

    The JSON representation of the DetachFromLangGroupRequest object.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 446

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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(detach_from_lang_group_request_v_next)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"BlogAuthorsApi.detach_from_lang_group",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  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.

Parameters:

  • object_id (String)

    The Blog Author id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :archived (Boolean)

    Specifies whether to return deleted Blog Authors. Defaults to &#x60;false&#x60;.

  • :property (String)

Returns:



506
507
508
509
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 506

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.

Parameters:

  • object_id (String)

    The Blog Author id.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :archived (Boolean)

    Specifies whether to return deleted Blog Authors. Defaults to &#x60;false&#x60;.

  • :property (String)

Returns:

  • (Array<(BlogAuthor, Integer, Hash)>)

    BlogAuthor data, response status code and response headers



518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 518

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?
  query_params[:'property'] = opts[:'property'] if !opts[:'property'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'BlogAuthor'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"BlogAuthorsApi.get_by_id",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :created_at (Time)

    Only return Blog Authors created at exactly the specified time.

  • :created_after (Time)

    Only return Blog Authors created after the specified time.

  • :created_before (Time)

    Only return Blog Authors created before the specified time.

  • :updated_at (Time)

    Only return Blog Authors last updated at exactly the specified time.

  • :updated_after (Time)

    Only return Blog Authors last updated after the specified time.

  • :updated_before (Time)

    Only return Blog Authors last updated before the specified time.

  • :sort (Array<String>)

    Specifies which fields to use for sorting results. Valid fields are &#x60;name&#x60;, &#x60;createdAt&#x60;, &#x60;updatedAt&#x60;, &#x60;createdBy&#x60;, &#x60;updatedBy&#x60;. &#x60;createdAt&#x60; will be used by default.

  • :after (String)

    The cursor token value to get the next set of results. You can get this from the &#x60;paging.next.after&#x60; JSON property of a paged response containing more results.

  • :limit (Integer)

    The maximum number of results to return. Default is 100.

  • :archived (Boolean)

    Specifies whether to return deleted Blog Authors. Defaults to &#x60;false&#x60;.

  • :property (String)

Returns:



583
584
585
586
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 583

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :created_at (Time)

    Only return Blog Authors created at exactly the specified time.

  • :created_after (Time)

    Only return Blog Authors created after the specified time.

  • :created_before (Time)

    Only return Blog Authors created before the specified time.

  • :updated_at (Time)

    Only return Blog Authors last updated at exactly the specified time.

  • :updated_after (Time)

    Only return Blog Authors last updated after the specified time.

  • :updated_before (Time)

    Only return Blog Authors last updated before the specified time.

  • :sort (Array<String>)

    Specifies which fields to use for sorting results. Valid fields are &#x60;name&#x60;, &#x60;createdAt&#x60;, &#x60;updatedAt&#x60;, &#x60;createdBy&#x60;, &#x60;updatedBy&#x60;. &#x60;createdAt&#x60; will be used by default.

  • :after (String)

    The cursor token value to get the next set of results. You can get this from the &#x60;paging.next.after&#x60; JSON property of a paged response containing more results.

  • :limit (Integer)

    The maximum number of results to return. Default is 100.

  • :archived (Boolean)

    Specifies whether to return deleted Blog Authors. Defaults to &#x60;false&#x60;.

  • :property (String)

Returns:



603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 603

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?
  query_params[:'property'] = opts[:'property'] if !opts[:'property'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'CollectionResponseWithTotalBlogAuthorForwardPaging'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"BlogAuthorsApi.get_page",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  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.

Parameters:

  • batch_input_string (BatchInputString)

    The JSON array of Blog Author ids.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :archived (Boolean)

    Specifies whether to return deleted Blog Authors. Defaults to &#x60;false&#x60;.

Returns:



664
665
666
667
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 664

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.

Parameters:

  • batch_input_string (BatchInputString)

    The JSON array of Blog Author ids.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :archived (Boolean)

    Specifies whether to return deleted Blog Authors. Defaults to &#x60;false&#x60;.

Returns:

  • (Array<(BatchResponseBlogAuthor, Integer, Hash)>)

    BatchResponseBlogAuthor data, response status code and response headers



675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 675

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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_string)

  # return_type
  return_type = opts[:debug_return_type] || 'BatchResponseBlogAuthor'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"BlogAuthorsApi.read_batch",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  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.

Parameters:

  • set_new_language_primary_request_v_next (SetNewLanguagePrimaryRequestVNext)

    The JSON representation of the SetNewLanguagePrimaryRequest object.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


734
735
736
737
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 734

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.

Parameters:

  • set_new_language_primary_request_v_next (SetNewLanguagePrimaryRequestVNext)

    The JSON representation of the SetNewLanguagePrimaryRequest object.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 744

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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(set_new_language_primary_request_v_next)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"BlogAuthorsApi.set_lang_primary",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  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.

Parameters:

  • object_id (String)

    The Blog Author id.

  • blog_author (BlogAuthor)

    The JSON representation of the updated Blog Author.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :archived (Boolean)

    Specifies whether to update deleted Blog Authors. Defaults to &#x60;false&#x60;.

Returns:



804
805
806
807
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 804

def update(object_id, blog_author, opts = {})
  data, _status_code, _headers = update_with_http_info(object_id, blog_author, 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.

Parameters:

  • batch_input_json_node (BatchInputJsonNode)

    A JSON array of the JSON representations of the updated Blog Authors.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :archived (Boolean)

    Specifies whether to update deleted Blog Authors. Defaults to &#x60;false&#x60;.

Returns:



880
881
882
883
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 880

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.

Parameters:

  • batch_input_json_node (BatchInputJsonNode)

    A JSON array of the JSON representations of the updated Blog Authors.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :archived (Boolean)

    Specifies whether to update deleted Blog Authors. Defaults to &#x60;false&#x60;.

Returns:

  • (Array<(BatchResponseBlogAuthor, Integer, Hash)>)

    BatchResponseBlogAuthor data, response status code and response headers



891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 891

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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_json_node)

  # return_type
  return_type = opts[:debug_return_type] || 'BatchResponseBlogAuthor'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"BlogAuthorsApi.update_batch",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  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 = {}) ⇒ nil

Update languages of multi-language group Explicitly set new languages for each Blog Author in a multi-language group.

Parameters:

  • update_languages_request_v_next (UpdateLanguagesRequestVNext)

    The JSON representation of the UpdateLanguagesRequest object.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


950
951
952
953
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 950

def update_langs(update_languages_request_v_next, opts = {})
  update_langs_with_http_info(update_languages_request_v_next, opts)
  nil
end

#update_langs_with_http_info(update_languages_request_v_next, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update languages of multi-language group Explicitly set new languages for each Blog Author in a multi-language group.

Parameters:

  • update_languages_request_v_next (UpdateLanguagesRequestVNext)

    The JSON representation of the UpdateLanguagesRequest object.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 960

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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_languages_request_v_next)

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"BlogAuthorsApi.update_langs",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  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.

Parameters:

  • object_id (String)

    The Blog Author id.

  • blog_author (BlogAuthor)

    The JSON representation of the updated Blog Author.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :archived (Boolean)

    Specifies whether to update deleted Blog Authors. Defaults to &#x60;false&#x60;.

Returns:

  • (Array<(BlogAuthor, Integer, Hash)>)

    BlogAuthor data, response status code and response headers



816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
# File 'lib/hubspot/codegen/cms/blogs/authors/api/blog_authors_api.rb', line 816

def update_with_http_info(object_id, blog_author, 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 && blog_author.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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(blog_author)

  # return_type
  return_type = opts[:debug_return_type] || 'BlogAuthor'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"BlogAuthorsApi.update",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  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