PHP code example of ivankotut / notebook-sdk

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

    

ivankotut / notebook-sdk example snippets


$client = new IvankoTut\NotebookSdk\ApiClient(
    'http://url/api/',
    new SerializerInterface(),
    [
        ['name' => 'ngrok-skip-browser-warning', 'value' => true]
    ]
);

$data = [
    'telegramId' => '11111',
    'firstName' => 'FirstName'
    'lastName' => 'LastNAme'
    'username' => 'Username'
];
$client->telegramUser()->createTelegramUser($token, $data);

$client->telegramUser()->getByTelegramId($token, $telegramId);

$data = [
    'name' => 'Tag name'
];
$client->tag()->create($token, $data);

$client->note()->byTag($token, $tagId, $page, $limit);

$data = [
    'page' => 1,     // опционально
    'limit' => 10,   // опционально
    'tagName' => '', // опционально
    'tagId' => '',   // опционально
    'note' => '',    // опционально
];
$client->note()->list($token, $data);