tzurbaev/osnova-api

Osnova API SDK

0.9.1 2018-12-06 20:24

Osnova API SDK

Build Status StyleCI ScrutinizerCI Latest Version on Packagist Software License

Requirements

This package requires PHP 7.1 or higher.

Installation

You can install the package via composer:

$ composer require tzurbaev/osnova-api

Examples

Get timeline entries

<?php

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'));

Get entries from subsite

<?php

use Osnova\TJournal;

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

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

Search for entries

<?php

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

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

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

Documentation

Full documentation is available here.

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ vendor/bin/phpunit

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email zurbaev@gmail.com instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.