faruh/smmry

访问 Smmry API 的 PHP 客户端库

v1.0.0 2016-05-28 19:06 UTC

This package is not auto-updated.

Last update: 2024-09-14 18:42:16 UTC


README

作者:Faruh Narzullaev

Smmry

通过 Composer 安装

安装 Smmry PHP 客户端的推荐方法是使用 Composer

composer require faruh/smmry

用法

<?php
    use Faruh\Smmry\SmmryClient;

    $client = new SmmryClient([
        'sm_api_key'       => 'API_KEY',
        'sm_length'        => 7,
        'sm_keyword_count' => 2
    ]);

    $result = $client
    	->strategy('url')
    	->setResource('http://randomtextgenerator.com/')
    	->summarize();

前往 http://smmry.com/partner 获取您的密钥。

文档: http://smmry.com/api