PHP code example of tzurbaev / osnova-api

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

    

tzurbaev / osnova-api example snippets




use Osnova\TJournal;
use Osnova\Services\Timeline\Owners\TimelineCategory;

// Create resource instance with the "1.4" API version.
$tjournal = TJournal::make('1.4');

$entries = $tjournal->getTimelineEntries(new TimelineCategory('index'));



use Osnova\TJournal;

$tjournal = TJournal::make('1.4');

$subsite = $tjournal->getSubsite(214352);
$entries = $tjournal->getTimelineEntries($subsite);



use Osnova\TJournal;
use Osnova\Services\Timeline\Owners\TimelineSearch;

$tjournal = TJournal::make('1.4');

$entries = $tjournal->getTimelineSearchResults('навальный');
// or
$entries = $tjournal->getTimelineEntries(new TimelineSearch('навальный'));