Skip to content

Commit a8bf13b

Browse files
CMS Pages
1 parent a89d4f0 commit a8bf13b

7 files changed

Lines changed: 126 additions & 0 deletions

File tree

lib/hubspot/discovery/cms/client.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def api_modules
1212
blogs
1313
domains
1414
hubdb
15+
pages
1516
performance
1617
site_search
1718
source_code
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
require_relative '../../../base_api_client'
2+
3+
module Hubspot
4+
module Discovery
5+
module Cms
6+
module Pages
7+
class LandingPagesApi
8+
include Hubspot::Discovery::BaseApiClient
9+
end
10+
end
11+
end
12+
end
13+
end
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
require_relative '../../../base_api_client'
2+
3+
module Hubspot
4+
module Discovery
5+
module Cms
6+
module Pages
7+
class SitePagesApi
8+
include Hubspot::Discovery::BaseApiClient
9+
end
10+
end
11+
end
12+
end
13+
end
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
require_relative '../../base_module_client'
2+
3+
module Hubspot
4+
module Discovery
5+
module Cms
6+
module Pages
7+
class Client
8+
include Hubspot::Discovery::BaseModuleClient
9+
10+
def api_classes
11+
%i[
12+
landing_pages
13+
site_pages
14+
].freeze
15+
end
16+
end
17+
end
18+
end
19+
end
20+
end

spec/discovery/cms/client_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
it { is_expected.to respond_to(:blogs) }
88
it { is_expected.to respond_to(:domains) }
99
it { is_expected.to respond_to(:hubdb) }
10+
it { is_expected.to respond_to(:pages) }
1011
it { is_expected.to respond_to(:performance) }
1112
it { is_expected.to respond_to(:site_search) }
1213
it { is_expected.to respond_to(:url_redirects) }
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
require 'spec_helper'
2+
3+
describe 'Hubspot::Discovery::Cms::Pages::LandingPagesApi' do
4+
subject(:pages_api) { Hubspot::Client.new(access_token: 'test').cms.pages.landing_pages_api }
5+
6+
it { is_expected.to respond_to(:archive) }
7+
it { is_expected.to respond_to(:archive_batch) }
8+
it { is_expected.to respond_to(:archive_folder) }
9+
it { is_expected.to respond_to(:archive_folders) }
10+
it { is_expected.to respond_to(:attach_to_lang_group) }
11+
it { is_expected.to respond_to(:clone) }
12+
it { is_expected.to respond_to(:create) }
13+
it { is_expected.to respond_to(:create_ab_test_variation) }
14+
it { is_expected.to respond_to(:create_batch) }
15+
it { is_expected.to respond_to(:create_folder) }
16+
it { is_expected.to respond_to(:create_folders) }
17+
it { is_expected.to respond_to(:create_lang_variation) }
18+
it { is_expected.to respond_to(:detach_from_lang_group) }
19+
it { is_expected.to respond_to(:end_active_ab_test) }
20+
it { is_expected.to respond_to(:get_by_id) }
21+
it { is_expected.to respond_to(:get_draft_by_id) }
22+
it { is_expected.to respond_to(:get_folder_by_id) }
23+
it { is_expected.to respond_to(:get_folder_previous_version) }
24+
it { is_expected.to respond_to(:get_folder_previous_versions) }
25+
it { is_expected.to respond_to(:get_folders_page) }
26+
it { is_expected.to respond_to(:get_page) }
27+
it { is_expected.to respond_to(:get_previous_version) }
28+
it { is_expected.to respond_to(:get_previous_versions) }
29+
it { is_expected.to respond_to(:push_live) }
30+
it { is_expected.to respond_to(:read_batch) }
31+
it { is_expected.to respond_to(:read_folders) }
32+
it { is_expected.to respond_to(:rerun_previous_ab_test) }
33+
it { is_expected.to respond_to(:reset_draft) }
34+
it { is_expected.to respond_to(:restore_folder_previous_version) }
35+
it { is_expected.to respond_to(:restore_previous_version) }
36+
it { is_expected.to respond_to(:restore_previous_version_to_draft) }
37+
it { is_expected.to respond_to(:schedule) }
38+
it { is_expected.to respond_to(:set_lang_primary) }
39+
it { is_expected.to respond_to(:update) }
40+
it { is_expected.to respond_to(:update_batch) }
41+
it { is_expected.to respond_to(:update_draft) }
42+
it { is_expected.to respond_to(:update_folder) }
43+
it { is_expected.to respond_to(:update_folders) }
44+
it { is_expected.to respond_to(:update_langs) }
45+
end
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
require 'spec_helper'
2+
3+
describe 'Hubspot::Discovery::Cms::Pages::SitePagesApi' do
4+
subject(:pages_api) { Hubspot::Client.new(access_token: 'test').cms.pages.site_pages_api }
5+
6+
it { is_expected.to respond_to(:archive) }
7+
it { is_expected.to respond_to(:archive_batch) }
8+
it { is_expected.to respond_to(:attach_to_lang_group) }
9+
it { is_expected.to respond_to(:clone) }
10+
it { is_expected.to respond_to(:create) }
11+
it { is_expected.to respond_to(:create_ab_test_variation) }
12+
it { is_expected.to respond_to(:create_batch) }
13+
it { is_expected.to respond_to(:create_lang_variation) }
14+
it { is_expected.to respond_to(:detach_from_lang_group) }
15+
it { is_expected.to respond_to(:end_active_ab_test) }
16+
it { is_expected.to respond_to(:get_by_id) }
17+
it { is_expected.to respond_to(:get_draft_by_id) }
18+
it { is_expected.to respond_to(:get_page) }
19+
it { is_expected.to respond_to(:get_previous_version) }
20+
it { is_expected.to respond_to(:get_previous_versions) }
21+
it { is_expected.to respond_to(:push_live) }
22+
it { is_expected.to respond_to(:read_batch) }
23+
it { is_expected.to respond_to(:rerun_previous_ab_test) }
24+
it { is_expected.to respond_to(:reset_draft) }
25+
it { is_expected.to respond_to(:restore_previous_version) }
26+
it { is_expected.to respond_to(:restore_previous_version_to_draft) }
27+
it { is_expected.to respond_to(:schedule) }
28+
it { is_expected.to respond_to(:set_lang_primary) }
29+
it { is_expected.to respond_to(:update) }
30+
it { is_expected.to respond_to(:update_batch) }
31+
it { is_expected.to respond_to(:update_draft) }
32+
it { is_expected.to respond_to(:update_langs) }
33+
end

0 commit comments

Comments
 (0)