2017 © Pedro Peláez
 

library yandex-api-webmaster

Client for yandex Webmaster

image

slava-basko/yandex-api-webmaster

Client for yandex Webmaster

  • Thursday, October 27, 2016
  • by slava-basko
  • Repository
  • 1 Watchers
  • 0 Stars
  • 149 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

yandex-api-webmaster

Credentials?

How to get a token? No matter. Choose your way https://tech.yandex.com/oauth/doc/dg/concepts/ya-oauth-intro-docpage/, (*1)

How to use?

use Yandex\Auth\Token;
use YandexWebmaster\Auth\User;
use YandexWebmaster\Http\Client;

$client = Client::create('client_id', 'client_password');
$user = new User('user_id', new Token('token'));

try {
    $action = new \YandexWebmaster\Action\AddSiteAction($user, 'example.com');
    $client->call($action);
} catch (\Yandex\Exception\YandexException $ex) {
    //TODO: maybe write to log...
}

Action => Return Type

Action Type Notes
GetUserIdAction int -
AddSiteAction string Host ID
AddOriginalTextAction OriginalText -
AddSitemapAction string Sitemap ID
DeleteOriginalTextAction true -
DeleteSiteAction true -
DeleteSitemapAction true -
GetListOfSitesAction Site[] -
GetSiteAction Site -
GetSiteOwnersAction SiteOwner -
GetSiteStatAction SiteStat -
GetSiteVerificationStatusAction SiteVerificationStatus -
VerifySiteAction SiteVerificationStatus -

The Versions

27/10 2016

dev-master

9999999-dev

Client for yandex Webmaster

  Sources   Download

MIT

The Requires

  • php >=5.5

 

by Slava Basko

api yandex yandex webmaster