s37dap42x/yandex-rich-content-api
最新稳定版本:1.1.2
Composer 安装命令:
composer require s37dap42x/yandex-rich-content-api
包简介
Client fo Yandex Rich Content API
README 文档
README
Client for Yandex Rich Content API
The Rich Content API provides access to the Yandex content system, containing tens of billions of pages. For any of them, you can receive the snippet, title and URL in canonical form, as well as the complete text and also a list of links to the images and videos they contain. This API is useful for services whose users exchange links. It allows them to see a preview of any web page without leaving the service.
Versioning
Package version corresponds to the version of the API.
Installation
Use composer:
composer require s37dap42x/yandex-rich-content-api
or manually add into your composer.json:
{
"require": {
"s37dap42x/yandex-rich-content-api": "1.1.*"
}
}
and then use the update command:
composer update
Usage
use Yandex\RichContentAPI\RichContent; $key = "rca.1.1..."; $url = "http://yandex.com"; try { $yandex = new RichContent($key); // Set optional parameters $yandex->setOptions(['img' => 'no', 'content' => 'full']); $data = $yandex->getContent($url); var_dump($data); // object } catch (Exception $e) { echo $e->getMessage(); }
#License
统计信息
- 总下载量: 37
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-11-05