PHP code example of zloykolobok / megaplan_v3

1. Go to this page and download the library: Download zloykolobok/megaplan_v3 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/ */

    

zloykolobok / megaplan_v3 example snippets


use Zloykolobok\Megaplan_v3\Megaplan;

$key = 'NmE2MGZkOWRmMjE3OThiZTY';
$domain = 'https://test.megaplan.ru';
$mega = new Megaplan($key, $domain);

$pagination = json_encode(['limit' => 1, 'pageAfter' => ["contentType" => "Employee", "id" => '1000003']]);
$res = $mega->send('api/v3/employee?' . $pagination);

$data = ["contentType" => "Comment", "content" => 'Текст комментария'];
$res = $mega->send('api/v3/deal/12/comments', 'POST', $data);