PHP code example of xanobius / notion-notifier

1. Go to this page and download the library: Download xanobius/notion-notifier library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

xanobius / notion-notifier example snippets


use Xanobius\NotionNotifier\NotionNotifier;

$notifier = new NotionNotifier;
$notifier->setPageId('[YOUR PAGE ID]');
$notifier->setNotionSecret('[YOUR NOTION SECRET]');

try{
    $notifier->updatePageValue('[PROPERTY NAME]', '[NEW VALUE]');
}catch(Exception $e){
    // do your error handling here
}

shell 
php artisan notion-notifier:version