slava-basko/yandex-api-core

Core code for clients

dev-master 2016-11-14 12:58 UTC

This package is auto-updated.

Last update: 2024-10-27 02:22:15 UTC


README

Core functionality for SDK

How to use?

use Yandex\Http\Client;
use Yandex\Auth\Token;
use Yandex\Http\Curl;
use YandexWebmaster\Action\GetUserIdAction;
use YandexWebmaster\ActionHandler\GetUserIdActionHandler;

$client = new Client('url', 'client_id', 'client_password', new Curl());
$client->addActionHandler(GetUserIdAction::class, GetUserIdActionHandler::class);
$client->addHeader('Content-type', 'application/json');

$client->call('<action>');