s37dap42x/yandex-rich-content-api 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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.

API reference

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

Get your own api key

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

MIT

统计信息

  • 总下载量: 37
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-11-05