PHP Class SevenShores\Hubspot\Resources\BlogPosts

Inheritance: extends Resource
Afficher le fichier Open project: fungku/hubspot-php

Méthodes publiques

Méthode Description
all ( array $params = [] ) : Response Get all blog posts.
clonePost ( integer $id ) : Response Clone the blog post.
create ( array $params = [] ) : Response Create a new blog post.
delete ( integer $id ) : Response Delete a blog post.
getAutoSaveBufferContents ( integer $id ) : Response Gets the current contents of the auto-save buffer.
getById ( integer $id ) : Response Get a specific blog post.
getVersion ( integer $post_id, integer $version_id ) : Response Get a previous version of the blog post.
hasBufferedChanges ( integer $id ) : Response Determine if the auto-save buffer differs from the live blog post.
publishAction ( integer $id, string $action ) : Response Either publishes or cancels publishing based on the POSTed JSON.
pushBufferLive ( integer $id ) : Response Copies the contents of the auto-save buffer into the live blog post.
restoreDeleted ( integer $id ) : Response Restores a previously deleted blog post.
restoreVersion ( integer $post_id, integer $version_id ) : Response Restore a previous version of the blog post.
update ( integer $id, array $params = [] ) : Response Update a blog post.
updateAutoSaveBuffer ( integer $id, array $params = [] ) : Response Updates the auto-save buffer. Live objects will not be impacted.
validateBuffer ( integer $id ) : Response Validates the auto-save buffer version of the blog post.
versions ( integer $id ) : Response List previous versions of the blog post.

Method Details

all() public méthode

Get all blog posts.
public all ( array $params = [] ) : Response
$params array Optional parameters.
Résultat SevenShores\Hubspot\Http\Response

clonePost() public méthode

Clone the blog post.
public clonePost ( integer $id ) : Response
$id integer The blog post ID
Résultat SevenShores\Hubspot\Http\Response

create() public méthode

Create a new blog post.
public create ( array $params = [] ) : Response
$params array Optional Parameters.
Résultat SevenShores\Hubspot\Http\Response

delete() public méthode

Delete a blog post.
public delete ( integer $id ) : Response
$id integer
Résultat SevenShores\Hubspot\Http\Response

getAutoSaveBufferContents() public méthode

Gets the current contents of the auto-save buffer.
public getAutoSaveBufferContents ( integer $id ) : Response
$id integer The blog post ID
Résultat SevenShores\Hubspot\Http\Response

getById() public méthode

Get a specific blog post.
public getById ( integer $id ) : Response
$id integer
Résultat SevenShores\Hubspot\Http\Response

getVersion() public méthode

Get a previous version of the blog post.
public getVersion ( integer $post_id, integer $version_id ) : Response
$post_id integer The blog post ID
$version_id integer The version ID
Résultat SevenShores\Hubspot\Http\Response

hasBufferedChanges() public méthode

Determine if the auto-save buffer differs from the live blog post.
public hasBufferedChanges ( integer $id ) : Response
$id integer The blog post ID
Résultat SevenShores\Hubspot\Http\Response

publishAction() public méthode

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 $id, string $action ) : Response
$id integer The blog post ID
$action string The publish action
Résultat SevenShores\Hubspot\Http\Response

pushBufferLive() public méthode

Copies the contents of the auto-save buffer into the live blog post.
public pushBufferLive ( integer $id ) : Response
$id integer The blog post ID
Résultat SevenShores\Hubspot\Http\Response

restoreDeleted() public méthode

Restores a previously deleted blog post.
public restoreDeleted ( integer $id ) : Response
$id integer The blog post ID
Résultat SevenShores\Hubspot\Http\Response

restoreVersion() public méthode

Restore a previous version of the blog post.
public restoreVersion ( integer $post_id, integer $version_id ) : Response
$post_id integer The blog post ID
$version_id integer The version ID
Résultat SevenShores\Hubspot\Http\Response

update() public méthode

Update a blog post.
public update ( integer $id, array $params = [] ) : Response
$id integer The blog post id.
$params array The blog post fields to update.
Résultat SevenShores\Hubspot\Http\Response

updateAutoSaveBuffer() public méthode

Updates the auto-save buffer. Live objects will not be impacted.
See also: http://developers.hubspot.com/docs/methods/blogv2/put_blog_posts_blog_post_id_buffer
public updateAutoSaveBuffer ( integer $id, array $params = [] ) : Response
$id integer The blog post ID.
$params array Allowed parameters.
Résultat SevenShores\Hubspot\Http\Response

validateBuffer() public méthode

Validates the auto-save buffer version of the blog post.
public validateBuffer ( integer $id ) : Response
$id integer The blog post ID
Résultat SevenShores\Hubspot\Http\Response

versions() public méthode

List previous versions of the blog post.
public versions ( integer $id ) : Response
$id integer The blog post ID
Résultat SevenShores\Hubspot\Http\Response