Class: HubSpotSDK::Resources::Cms::Blogs::Authors
- Inherits:
-
Object
- Object
- HubSpotSDK::Resources::Cms::Blogs::Authors
- 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
-
#attach_to_lang_group(id:, language:, primary_id:, primary_language: nil, request_options: {}) ⇒ StringIO
Attach a Blog Author to a multi-language group.
-
#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_language_variation(id:, blog_author:, language: nil, primary_language: nil, request_options: {}) ⇒ StringIO
Create a new language variation from an existing Blog Author.
-
#delete(object_id_, archived: nil, request_options: {}) ⇒ nil
Delete the Blog Author object identified by the id in the path.
-
#detach_from_lang_group(id:, request_options: {}) ⇒ StringIO
Detach a Blog Author from a multi-language group.
-
#get(object_id_, archived: nil, property: nil, request_options: {}) ⇒ StringIO
Retrieve the Blog Author object identified by the id in the path.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#initialize(client:) ⇒ Authors
constructor
private
A new instance of Authors.
-
#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.
-
#set_new_lang_primary(id:, request_options: {}) ⇒ nil
Set a Blog Author as the primary language of a multi-language group.
-
#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.
-
#update_languages(languages:, primary_id:, request_options: {}) ⇒ StringIO
Some parameter documentations has been truncated, see Models::Cms::Blogs::AuthorUpdateLanguagesParams for more details.
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.
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
#batch ⇒ HubSpotSDK::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.
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, = 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: ) 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.
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, = 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: ) 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.
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, = 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: ) end |
#delete(object_id_, archived: nil, request_options: {}) ⇒ nil
Delete the Blog Author object identified by the id in the path.
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, = 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: ) end |
#detach_from_lang_group(id:, request_options: {}) ⇒ StringIO
Detach a Blog Author from a multi-language group.
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, = 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: ) end |
#get(object_id_, archived: nil, property: nil, request_options: {}) ⇒ StringIO
Retrieve the Blog Author object identified by the id in the path.
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, = 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: ) 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.
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, = 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: ) 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.
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, = 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: ) 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.
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, = 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: ) 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.
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, = 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: ) 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.
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 (params = {}) parsed, = 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: ) 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.
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 (params = {}) parsed, = 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: ) 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.
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, = 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: ) end |
#set_new_lang_primary(id:, request_options: {}) ⇒ nil
Set a Blog Author as the primary language of a multi-language group.
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, = 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: ) 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.
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, = 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: ) 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.
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, = 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: ) end |