PHP Class SevenShores\Hubspot\Resources\Pages

Inheritance: extends Resource
显示文件 Open project: fungku/hubspot-php

Public Methods

Method Description
all ( array $params = [] ) : Response Get all pages.
clonePage ( integer $page_id ) : Response Clone the page.
create ( array $params ) : Response Create a new page.
delete ( integer $page_id ) : Response Delete a page.
getAutoSaveBufferContents ( integer $page_id ) : Response Gets the current contents of the auto-save buffer.
getById ( integer $page_id ) : Response Get a specific page.
hasBufferedChanges ( integer $page_id ) : Response Determine if the auto-save buffer differs from the live page.
publishAction ( integer $page_id, string $action ) : Response Either publishes or cancels publishing based on the POSTed JSON.
pushBufferLive ( integer $page_id ) : Response Copies the contents of the auto-save buffer into the live page.
restoreDeleted ( integer $page_id ) : Response Restores a previously deleted page.
restoreVersion ( integer $page_id, integer $version_id ) : Response Restore a previous version of the page.
update ( integer $page_id, array $params ) : Response Update a page.
updateAutoSaveBuffer ( in $page_id ) : Response Updates the auto-save buffer.
validateBuffer ( integer $page_id ) : Response Validates the auto-save buffer version of the page.
versions ( integer $page_id ) : Response List previous versions of the page.

Method Details

all() public method

Get all pages.
public all ( array $params = [] ) : Response
$params array Optional parameters.
return SevenShores\Hubspot\Http\Response

clonePage() public method

Clone the page.
public clonePage ( integer $page_id ) : Response
$page_id integer The page ID
return SevenShores\Hubspot\Http\Response

create() public method

Create a new page.
public create ( array $params ) : Response
$params array Optional Parameters.
return SevenShores\Hubspot\Http\Response

delete() public method

Delete a page.
public delete ( integer $page_id ) : Response
$page_id integer
return SevenShores\Hubspot\Http\Response

getAutoSaveBufferContents() public method

Gets the current contents of the auto-save buffer.
public getAutoSaveBufferContents ( integer $page_id ) : Response
$page_id integer The page ID
return SevenShores\Hubspot\Http\Response

getById() public method

Get a specific page.
public getById ( integer $page_id ) : Response
$page_id integer
return SevenShores\Hubspot\Http\Response

hasBufferedChanges() public method

Determine if the auto-save buffer differs from the live page.
public hasBufferedChanges ( integer $page_id ) : Response
$page_id integer The page ID
return SevenShores\Hubspot\Http\Response

publishAction() public method

Allowable actions are: "push-buffer-live", "schedule-publish", "cancel-publish". "push-buffer-live": copies the current contents of the auto-save buffer into the live object. "schedule-publish": which pushes the buffer live and then sets up the content for publishing at the existing publish_date time. "cancel-publish": cancels a previous schedule-publish action.
public publishAction ( integer $page_id, string $action ) : Response
$page_id integer The page ID
$action string The publish action
return SevenShores\Hubspot\Http\Response

pushBufferLive() public method

Copies the contents of the auto-save buffer into the live page.
public pushBufferLive ( integer $page_id ) : Response
$page_id integer The page ID
return SevenShores\Hubspot\Http\Response

restoreDeleted() public method

Restores a previously deleted page.
public restoreDeleted ( integer $page_id ) : Response
$page_id integer The page ID
return SevenShores\Hubspot\Http\Response

restoreVersion() public method

Restore a previous version of the page.
public restoreVersion ( integer $page_id, integer $version_id ) : Response
$page_id integer The page ID
$version_id integer The version ID
return SevenShores\Hubspot\Http\Response

update() public method

Update a page.
public update ( integer $page_id, array $params ) : Response
$page_id integer The page id.
$params array The page fields to update.
return SevenShores\Hubspot\Http\Response

updateAutoSaveBuffer() public method

Updates the auto-save buffer.
public updateAutoSaveBuffer ( in $page_id ) : Response
$page_id in The page ID
return SevenShores\Hubspot\Http\Response

validateBuffer() public method

Validates the auto-save buffer version of the page.
public validateBuffer ( integer $page_id ) : Response
$page_id integer The page ID
return SevenShores\Hubspot\Http\Response

versions() public method

List previous versions of the page.
public versions ( integer $page_id ) : Response
$page_id integer The page ID
return SevenShores\Hubspot\Http\Response