Class: HubSpotSDK::Resources::Cms::Blogs::Authors

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot_sdk/resources/cms/blogs/authors.rb,
lib/hubspot_sdk/resources/cms/blogs/authors/batch.rb

Defined Under Namespace

Classes: Batch

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Authors

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Authors.

Parameters:



694
695
696
697
# File 'lib/hubspot_sdk/resources/cms/blogs/authors.rb', line 694

def initialize(client:)
  @client = client
  @batch = HubSpotSDK::Resources::Cms::Blogs::Authors::Batch.new(client: client)
end

Instance Attribute Details

#batchHubSpotSDK::Resources::Cms::Blogs::Authors::Batch (readonly)



9
10
11
# File 'lib/hubspot_sdk/resources/cms/blogs/authors.rb', line 9

def batch
  @batch
end

Instance Method Details

#attach_to_lang_group(id:, language:, primary_id:, primary_language: nil, request_options: {}) ⇒ StringIO

Attach a Blog Author to a multi-language group.

Parameters:

Returns:

  • (StringIO)

See Also:



234
235
236
237
238
239
240
241
242
243
244
# File 'lib/hubspot_sdk/resources/cms/blogs/authors.rb', line 234

def attach_to_lang_group(params)
  parsed, options = HubSpotSDK::Cms::Blogs::AuthorAttachToLangGroupParams.dump_request(params)
  @client.request(
    method: :post,
    path: "cms/blogs/2026-03/authors/multi-language/attach-to-lang-group",
    headers: {"content-type" => "*/*", "accept" => "*/*"},
    body: parsed,
    model: StringIO,
    options: options
  )
end

#create(id:, avatar:, bio:, created:, deleted_at:, display_name:, email:, facebook:, full_name:, language:, linkedin:, name:, slug:, translated_from_id:, twitter:, updated:, website:, request_options: {}) ⇒ StringIO

Some parameter documentations has been truncated, see Models::Cms::Blogs::AuthorCreateParams for more details.

Create a new Blog Author.

Parameters:

  • id (String)

    The unique ID of the Blog Author.

  • avatar (String)

    URL to the blog author’s avatar, if supplying a custom one.

  • bio (String)

    A short biography of the blog author.

  • created (Time)

    The timestamp (ISO8601 format) when this Blog Author was created.

  • deleted_at (Time)

    The timestamp (ISO8601 format) when this Blog Author was deleted.

  • display_name (String)

    The full name of the Blog Author to be displayed.

  • email (String)

    Email address of the Blog Author.

  • facebook (String)

    URL to the Blog Author’s Facebook page.

  • full_name (String)

    The full, unabbreviated name of the blog author, typically their first and last

  • language (Symbol, HubSpotSDK::Models::Cms::Blogs::BlogAuthor::Language)

    The explicitly defined ISO 639 language code of the blog author.

  • linkedin (String)

    URL to the blog author’s LinkedIn page.

  • name (String)

    The name field for the blog author. (This appears to be a shorter or alternative

  • slug (String)

    A URL-friendly identifier for the blog author that can be used to reference the

  • translated_from_id (Integer)

    ID of the primary blog author this object was translated from.

  • twitter (String)

    URL or username of the Twitter account associated with the Blog Author. This wil

  • updated (Time)

    The timestamp (ISO8601 format) when this Blog Author was updated.

  • website (String)

    URL to the website of the Blog Author.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



57
58
59
60
61
62
63
64
65
66
67
# File 'lib/hubspot_sdk/resources/cms/blogs/authors.rb', line 57

def create(params)
  parsed, options = HubSpotSDK::Cms::Blogs::AuthorCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "cms/blogs/2026-03/authors",
    headers: {"content-type" => "*/*", "accept" => "*/*"},
    body: parsed,
    model: StringIO,
    options: options
  )
end

#create_language_variation(id:, blog_author:, language: nil, primary_language: nil, request_options: {}) ⇒ StringIO

Create a new language variation from an existing Blog Author.

Parameters:

Returns:

  • (StringIO)

See Also:



263
264
265
266
267
268
269
270
271
272
273
# File 'lib/hubspot_sdk/resources/cms/blogs/authors.rb', line 263

def create_language_variation(params)
  parsed, options = HubSpotSDK::Cms::Blogs::AuthorCreateLanguageVariationParams.dump_request(params)
  @client.request(
    method: :post,
    path: "cms/blogs/2026-03/authors/multi-language/create-language-variation",
    headers: {"content-type" => "*/*", "accept" => "*/*"},
    body: parsed,
    model: StringIO,
    options: options
  )
end

#delete(object_id_, archived: nil, request_options: {}) ⇒ nil

Delete the Blog Author object identified by the id in the path.

Parameters:

  • object_id_ (String)
  • archived (Boolean)

    Whether to return only results that have been archived.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (nil)

See Also:



205
206
207
208
209
210
211
212
213
214
215
# File 'lib/hubspot_sdk/resources/cms/blogs/authors.rb', line 205

def delete(object_id_, params = {})
  parsed, options = HubSpotSDK::Cms::Blogs::AuthorDeleteParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :delete,
    path: ["cms/blogs/2026-03/authors/%1$s", object_id_],
    query: query,
    model: NilClass,
    options: options
  )
end

#detach_from_lang_group(id:, request_options: {}) ⇒ StringIO

Detach a Blog Author from a multi-language group.

Parameters:

  • id (String)

    ID of the object to remove from a multi-language group.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



286
287
288
289
290
291
292
293
294
295
296
# File 'lib/hubspot_sdk/resources/cms/blogs/authors.rb', line 286

def detach_from_lang_group(params)
  parsed, options = HubSpotSDK::Cms::Blogs::AuthorDetachFromLangGroupParams.dump_request(params)
  @client.request(
    method: :post,
    path: "cms/blogs/2026-03/authors/multi-language/detach-from-lang-group",
    headers: {"content-type" => "*/*", "accept" => "*/*"},
    body: parsed,
    model: StringIO,
    options: options
  )
end

#get(object_id_, archived: nil, property: nil, request_options: {}) ⇒ StringIO

Retrieve the Blog Author object identified by the id in the path.

Parameters:

  • object_id_ (String)
  • archived (Boolean)

    Whether to return only results that have been archived.

  • property (String)
  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



313
314
315
316
317
318
319
320
321
322
323
324
# File 'lib/hubspot_sdk/resources/cms/blogs/authors.rb', line 313

def get(object_id_, params = {})
  parsed, options = HubSpotSDK::Cms::Blogs::AuthorGetParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["cms/blogs/2026-03/authors/%1$s", object_id_],
    query: query,
    headers: {"accept" => "*/*"},
    model: StringIO,
    options: options
  )
end

#get_cursor(after: nil, archived: nil, created_after: nil, created_at: nil, created_before: nil, limit: nil, property: nil, sort: nil, updated_after: nil, updated_at: nil, updated_before: nil, request_options: {}) ⇒ StringIO

Some parameter documentations has been truncated, see Models::Cms::Blogs::AuthorGetCursorParams for more details.

Parameters:

  • after (String)

    The paging cursor token of the last successfully read resource will be returned

  • archived (Boolean)

    Whether to return only results that have been archived.

  • created_after (Time)
  • created_at (Time)
  • created_before (Time)
  • limit (Integer)

    The maximum number of results to display per page.

  • property (String)
  • sort (Array<String>)
  • updated_after (Time)
  • updated_at (Time)
  • updated_before (Time)
  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
# File 'lib/hubspot_sdk/resources/cms/blogs/authors.rb', line 358

def get_cursor(params = {})
  parsed, options = HubSpotSDK::Cms::Blogs::AuthorGetCursorParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "cms/blogs/2026-03/authors/cursor",
    query: query.transform_keys(
      created_after: "createdAfter",
      created_at: "createdAt",
      created_before: "createdBefore",
      updated_after: "updatedAfter",
      updated_at: "updatedAt",
      updated_before: "updatedBefore"
    ),
    headers: {"accept" => "*/*"},
    model: StringIO,
    options: options
  )
end

#get_cursor_by_query(after: nil, archived: nil, created_after: nil, created_at: nil, created_before: nil, limit: nil, property: nil, sort: nil, updated_after: nil, updated_at: nil, updated_before: nil, request_options: {}) ⇒ StringIO

Some parameter documentations has been truncated, see Models::Cms::Blogs::AuthorGetCursorByQueryParams for more details.

Parameters:

  • after (String)

    The paging cursor token of the last successfully read resource will be returned

  • archived (Boolean)

    Whether to return only results that have been archived.

  • created_after (Time)
  • created_at (Time)
  • created_before (Time)
  • limit (Integer)

    The maximum number of results to display per page.

  • property (String)
  • sort (Array<String>)
  • updated_after (Time)
  • updated_at (Time)
  • updated_before (Time)
  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
# File 'lib/hubspot_sdk/resources/cms/blogs/authors.rb', line 410

def get_cursor_by_query(params = {})
  parsed, options = HubSpotSDK::Cms::Blogs::AuthorGetCursorByQueryParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "cms/blogs/2026-03/authors/cursor/query",
    query: query.transform_keys(
      created_after: "createdAfter",
      created_at: "createdAt",
      created_before: "createdBefore",
      updated_after: "updatedAfter",
      updated_at: "updatedAt",
      updated_before: "updatedBefore"
    ),
    headers: {"accept" => "*/*"},
    model: StringIO,
    options: options
  )
end

#get_posts_cursor(after: nil, archived: nil, created_after: nil, created_at: nil, created_before: nil, limit: nil, property: nil, sort: nil, updated_after: nil, updated_at: nil, updated_before: nil, request_options: {}) ⇒ StringIO

Some parameter documentations has been truncated, see Models::Cms::Blogs::AuthorGetPostsCursorParams for more details.

Parameters:

  • after (String)

    The paging cursor token of the last successfully read resource will be returned

  • archived (Boolean)

    Whether to return only results that have been archived.

  • created_after (Time)
  • created_at (Time)
  • created_before (Time)
  • limit (Integer)

    The maximum number of results to display per page.

  • property (String)
  • sort (Array<String>)
  • updated_after (Time)
  • updated_at (Time)
  • updated_before (Time)
  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
# File 'lib/hubspot_sdk/resources/cms/blogs/authors.rb', line 462

def get_posts_cursor(params = {})
  parsed, options = HubSpotSDK::Cms::Blogs::AuthorGetPostsCursorParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "cms/blogs/2026-03/posts/cursor",
    query: query.transform_keys(
      created_after: "createdAfter",
      created_at: "createdAt",
      created_before: "createdBefore",
      updated_after: "updatedAfter",
      updated_at: "updatedAt",
      updated_before: "updatedBefore"
    ),
    headers: {"accept" => "*/*"},
    model: StringIO,
    options: options
  )
end

#get_posts_cursor_by_query(after: nil, archived: nil, created_after: nil, created_at: nil, created_before: nil, limit: nil, property: nil, sort: nil, updated_after: nil, updated_at: nil, updated_before: nil, request_options: {}) ⇒ StringIO

Some parameter documentations has been truncated, see Models::Cms::Blogs::AuthorGetPostsCursorByQueryParams for more details.

Parameters:

  • after (String)

    The paging cursor token of the last successfully read resource will be returned

  • archived (Boolean)

    Whether to return only results that have been archived.

  • created_after (Time)
  • created_at (Time)
  • created_before (Time)
  • limit (Integer)

    The maximum number of results to display per page.

  • property (String)
  • sort (Array<String>)
  • updated_after (Time)
  • updated_at (Time)
  • updated_before (Time)
  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
# File 'lib/hubspot_sdk/resources/cms/blogs/authors.rb', line 515

def get_posts_cursor_by_query(params = {})
  parsed, options = HubSpotSDK::Cms::Blogs::AuthorGetPostsCursorByQueryParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "cms/blogs/2026-03/posts/cursor/query",
    query: query.transform_keys(
      created_after: "createdAfter",
      created_at: "createdAt",
      created_before: "createdBefore",
      updated_after: "updatedAfter",
      updated_at: "updatedAt",
      updated_before: "updatedBefore"
    ),
    headers: {"accept" => "*/*"},
    model: StringIO,
    options: options
  )
end

#get_tags_cursor(after: nil, archived: nil, created_after: nil, created_at: nil, created_before: nil, limit: nil, property: nil, sort: nil, updated_after: nil, updated_at: nil, updated_before: nil, request_options: {}) ⇒ StringIO

Some parameter documentations has been truncated, see Models::Cms::Blogs::AuthorGetTagsCursorParams for more details.

Parameters:

  • after (String)

    The paging cursor token of the last successfully read resource will be returned

  • archived (Boolean)

    Whether to return only results that have been archived.

  • created_after (Time)
  • created_at (Time)
  • created_before (Time)
  • limit (Integer)

    The maximum number of results to display per page.

  • property (String)
  • sort (Array<String>)
  • updated_after (Time)
  • updated_at (Time)
  • updated_before (Time)
  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
# File 'lib/hubspot_sdk/resources/cms/blogs/authors.rb', line 567

def get_tags_cursor(params = {})
  parsed, options = HubSpotSDK::Cms::Blogs::AuthorGetTagsCursorParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "cms/blogs/2026-03/tags/cursor",
    query: query.transform_keys(
      created_after: "createdAfter",
      created_at: "createdAt",
      created_before: "createdBefore",
      updated_after: "updatedAfter",
      updated_at: "updatedAt",
      updated_before: "updatedBefore"
    ),
    headers: {"accept" => "*/*"},
    model: StringIO,
    options: options
  )
end

#get_tags_cursor_by_query(after: nil, archived: nil, created_after: nil, created_at: nil, created_before: nil, limit: nil, property: nil, sort: nil, updated_after: nil, updated_at: nil, updated_before: nil, request_options: {}) ⇒ StringIO

Some parameter documentations has been truncated, see Models::Cms::Blogs::AuthorGetTagsCursorByQueryParams for more details.

Parameters:

  • after (String)

    The paging cursor token of the last successfully read resource will be returned

  • archived (Boolean)

    Whether to return only results that have been archived.

  • created_after (Time)
  • created_at (Time)
  • created_before (Time)
  • limit (Integer)

    The maximum number of results to display per page.

  • property (String)
  • sort (Array<String>)
  • updated_after (Time)
  • updated_at (Time)
  • updated_before (Time)
  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
# File 'lib/hubspot_sdk/resources/cms/blogs/authors.rb', line 620

def get_tags_cursor_by_query(params = {})
  parsed, options = HubSpotSDK::Cms::Blogs::AuthorGetTagsCursorByQueryParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "cms/blogs/2026-03/tags/cursor/query",
    query: query.transform_keys(
      created_after: "createdAfter",
      created_at: "createdAt",
      created_before: "createdBefore",
      updated_after: "updatedAfter",
      updated_at: "updatedAt",
      updated_before: "updatedBefore"
    ),
    headers: {"accept" => "*/*"},
    model: StringIO,
    options: options
  )
end

#list(after: nil, archived: nil, created_after: nil, created_at: nil, created_before: nil, limit: nil, property: nil, sort: nil, updated_after: nil, updated_at: nil, updated_before: nil, request_options: {}) ⇒ StringIO

Some parameter documentations has been truncated, see Models::Cms::Blogs::AuthorListParams for more details.

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:

  • after (String)

    The paging cursor token of the last successfully read resource will be returned

  • archived (Boolean)

    Whether to return only results that have been archived.

  • created_after (Time)
  • created_at (Time)
  • created_before (Time)
  • limit (Integer)

    The maximum number of results to display per page.

  • property (String)
  • sort (Array<String>)
  • updated_after (Time)
  • updated_at (Time)
  • updated_before (Time)
  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# File 'lib/hubspot_sdk/resources/cms/blogs/authors.rb', line 172

def list(params = {})
  parsed, options = HubSpotSDK::Cms::Blogs::AuthorListParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "cms/blogs/2026-03/authors",
    query: query.transform_keys(
      created_after: "createdAfter",
      created_at: "createdAt",
      created_before: "createdBefore",
      updated_after: "updatedAfter",
      updated_at: "updatedAt",
      updated_before: "updatedBefore"
    ),
    headers: {"accept" => "*/*"},
    model: StringIO,
    options: options
  )
end

#set_new_lang_primary(id:, request_options: {}) ⇒ nil

Set a Blog Author as the primary language of a multi-language group.

Parameters:

  • id (String)

    ID of object to set as primary in multi-language group.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (nil)

See Also:



651
652
653
654
655
656
657
658
659
660
661
# File 'lib/hubspot_sdk/resources/cms/blogs/authors.rb', line 651

def set_new_lang_primary(params)
  parsed, options = HubSpotSDK::Cms::Blogs::AuthorSetNewLangPrimaryParams.dump_request(params)
  @client.request(
    method: :put,
    path: "cms/blogs/2026-03/authors/multi-language/set-new-lang-primary",
    headers: {"content-type" => "*/*"},
    body: parsed,
    model: NilClass,
    options: options
  )
end

#update(object_id_, id:, avatar:, bio:, created:, deleted_at:, display_name:, email:, facebook:, full_name:, language:, linkedin:, name:, slug:, translated_from_id:, twitter:, updated:, website:, archived: nil, request_options: {}) ⇒ StringIO

Some parameter documentations has been truncated, see Models::Cms::Blogs::AuthorUpdateParams for more details.

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)

    Path param

  • id (String)

    Body param: The unique ID of the Blog Author.

  • avatar (String)

    Body param: URL to the blog author’s avatar, if supplying a custom one.

  • bio (String)

    Body param: A short biography of the blog author.

  • created (Time)

    Body param: The timestamp (ISO8601 format) when this Blog Author was created.

  • deleted_at (Time)

    Body param: The timestamp (ISO8601 format) when this Blog Author was deleted.

  • display_name (String)

    Body param: The full name of the Blog Author to be displayed.

  • email (String)

    Body param: Email address of the Blog Author.

  • facebook (String)

    Body param: URL to the Blog Author’s Facebook page.

  • full_name (String)

    Body param: The full, unabbreviated name of the blog author, typically their fir

  • language (Symbol, HubSpotSDK::Models::Cms::Blogs::BlogAuthor::Language)

    Body param: The explicitly defined ISO 639 language code of the blog author.

  • linkedin (String)

    Body param: URL to the blog author’s LinkedIn page.

  • name (String)

    Body param: The name field for the blog author. (This appears to be a shorter or

  • slug (String)

    Body param: A URL-friendly identifier for the blog author that can be used to re

  • translated_from_id (Integer)

    Body param: ID of the primary blog author this object was translated from.

  • twitter (String)

    Body param: URL or username of the Twitter account associated with the Blog Auth

  • updated (Time)

    Body param: The timestamp (ISO8601 format) when this Blog Author was updated.

  • website (String)

    Body param: URL to the website of the Blog Author.

  • archived (Boolean)

    Query param: Whether to return only results that have been archived.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



121
122
123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/hubspot_sdk/resources/cms/blogs/authors.rb', line 121

def update(object_id_, params)
  query_params = [:archived]
  parsed, options = HubSpotSDK::Cms::Blogs::AuthorUpdateParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params))
  @client.request(
    method: :patch,
    path: ["cms/blogs/2026-03/authors/%1$s", object_id_],
    query: query,
    headers: {"content-type" => "*/*", "accept" => "*/*"},
    body: parsed.except(*query_params),
    model: StringIO,
    options: options
  )
end

#update_languages(languages:, primary_id:, request_options: {}) ⇒ StringIO

Some parameter documentations has been truncated, see Models::Cms::Blogs::AuthorUpdateLanguagesParams for more details.

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

Parameters:

Returns:

  • (StringIO)

See Also:



679
680
681
682
683
684
685
686
687
688
689
# File 'lib/hubspot_sdk/resources/cms/blogs/authors.rb', line 679

def update_languages(params)
  parsed, options = HubSpotSDK::Cms::Blogs::AuthorUpdateLanguagesParams.dump_request(params)
  @client.request(
    method: :post,
    path: "cms/blogs/2026-03/authors/multi-language/update-languages",
    headers: {"content-type" => "*/*", "accept" => "*/*"},
    body: parsed,
    model: StringIO,
    options: options
  )
end