alexreznikov/webmaster.api
Composer 安装命令:
composer require alexreznikov/webmaster.api
包简介
Yandex Webmaster Api v3 library
关键字:
README 文档
README
Installation
Composer
add into composer.json
{ "require": { ... "yandex/webmaster.api": "dev-master" ... } }
or
php composer.phar require yandex/webmaster.api "dev-master"
Also required prior to placing the package on packagist.org
...
"repositories": [
{
"type": "vcs",
"url": "https://github.com/yandex/webmaster.api"
}
]
...
Manual
Clone repository and require webmasterApi.php
Usage
###How to use example:
-
Before use this code go to https://oauth.yandex.ru/client/new and add new client
-
Create file "example/config.php" by copy "config.example.php". Add client ID and secret code here to use example
###How to use webmasterApi class:
-
Add client on https://oauth.yandex.ru/client/new page. Don't forget to set up correct return url
-
For test you can get temporary Access Token (read comments to method webmasterApi::getAccessToken )
-
If you want to get correct Access Token, you must create authorization code. 2.1 Read doc on https://tech.yandex.ru/oauth/doc/dg/reference/web-client-docpage/ 2.2 Locate your client to https://oauth.yandex.ru/authorize?response_type=code&client_id=[yourclient_id] 2.3 Use static method getAccessToken to get access token 2.4 Create webmasterApi object with static method webmasterApi::initApi
You can see example/.auth.php to see how it working
- Enjoy!
Methods addHost, addOriginalText, addSitemap, checkVerification, curlOpts, dataToString, delete, deleteHost, deleteOriginalText, deleteSitemap, errorCritical, get, getAccessToken, getApiUrl, getHostInfo, getHostOwners, getHostSitemaps, getHostSummary, getHostUserSitemaps, getHosts, getIndexingHistory, getOriginalTexts, getPopularQueries, getTicHistory, getUserID, initApi, post, verifyHost
统计信息
- 总下载量: 24
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MPL-2.0
- 更新时间: 2018-09-18