Skip to content

Class: Page

Adam Campbell edited this page Nov 7, 2016 · 5 revisions

Class Definition

The Page Class facilitates functionality required to manage Pages. This includes the fetching of specific Page data, a set of all Page data, inserting/updating a Page, and deleting an existing Page.


Method Overview

Name Description
get_page Gets a data set of information for a specific Page
get_all_pages Gets a data set of information for all Pages
put_page Sets (insert/update) a Page
delete_page Deletes an existing Page.

Method Detail

get_page

Retrieves a data set of information for a specific Page from the Page table.

Parameters
page_name - The Page name of the Page you want to get information for.
page_table - The CMS-specific table name for the Page table.

Returns
Data - A data set of information for the specific Page.

Throws
InvalidPageName - The Page name provided does not match any existing Page.
Botocore Exception - Refer to Botocore documentation.


get_all_pages

Retrieves a data set of information regarding the existing Pages from the Page table.

Parameters
page_table - The CMS-specific table name for the Page table.

Returns
Message - Successfully retrieved Page data Data - A data set of information for existing Pages.

Throws
noPages - There are no existing Pages within the Page table.
Botocore Exception - Refer to Botocore documentation.


put_page

Inserts a Page into the Page table. This can be either inserting a new Page, or updating an existing Page.

Parameters
page_name - The Authors name of the Page.
content - The HTML content of the Page.
description - The SEO description of the Page.
keywords - The SEO keywords of the Page.
page_table - The CMS-specific table name for the Page table.
bucket - The CMS-specific bucket name for the S3 bucket.

Returns
Message - Successfully put Page.
Data - A data set of information for the inserted Page.

Throws
Botocore Exception - Refer to Botocore documentation.


delete_page

Deletes an existing Page from the Page table.

Parameters
page_name - The Page name of the Page you want to delete.
page_table - The CMS-specific table name for the Page table.
bucket - The CMS-specific bucket name for the S3 bucket.

Returns
Message - Successfully deleted Page.

Throws
Botocore Exception - Refer to Botocore documentation.


Clone this wiki locally