DataSift_Historic::getPushSubscriptions PHP Method

getPushSubscriptions() public method

Get a page of push subscriptions for this historic query, where each page contains up to $per_page items. Results will be returned in the order requested.
public getPushSubscriptions ( DataSift_User $user, integer $page = 1, integer $per_page = 20, String $order_by = self::ORDERBY_CREATED_AT, String $order_dir = self::ORDERDIR_ASC, boolean $include_finished = false )
$user DataSift_User The user object.
$page integer The page number to get.
$per_page integer The number of items per page.
$order_by String Which field to sort by.
$order_dir String In asc[ending] or desc[ending] order.
$include_finished boolean Set to true when you want to include finished subscription in the results.
    public function getPushSubscriptions($user, $page = 1, $per_page = 20, $order_by = self::ORDERBY_CREATED_AT, $order_dir = self::ORDERDIR_ASC, $include_finished = false)
    {
        if ($this->_deleted) {
            throw new DataSift_Exception_InvalidData('Cannot get the push subscriptions for a deleted Historic.');
        }
        if ($this->_playback_id === false || strlen($this->_playback_id) == 0) {
            throw new DataSift_Exception_InvalidData('Cannot get the push subscriptions for a historic query that hasn\'t been prepared.');
        }
        return DataSift_Push_Subscription::listSubscriptions($this->_user, $page, $per_page, $order_by, $order_dir, $include_finished, $hash_type = 'playback_id', $this->_playback_id);
    }