SevenShores\Hubspot\Resources\Pages::publishAction PHP Method

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
    function publishAction($page_id, $action)
    {
        $endpoint = "https://api.hubapi.com/content/api/v2/pages/{$page_id}/publish-action";
        $options['json'] = ['action' => $action];
        return $this->client->request('post', $endpoint, $options);
    }