定制 anime-db/world-art-browser-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

anime-db/world-art-browser-bundle

最新稳定版本:v2.1.1

Composer 安装命令:

composer require anime-db/world-art-browser-bundle

包简介

World-Art.ru API browser

README 文档

README

World Art

Latest Stable Version Total Downloads Build Status Coverage Status Scrutinizer Code Quality SensioLabs Insight StyleCI License

World-Art.ru API browser

Installation

Pretty simple with Composer, run:

composer require anime-db/world-art-browser-bundle

Add AnimeDbWorldArtBrowserBundle to your application kernel

// app/appKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new AnimeDb\Bundle\WorldArtBrowserBundle\AnimeDbWorldArtBrowserBundle(),
    );
}

Configuration

anime_db_world_art_browser:
    # Host name
    # As a default used 'http://www.world-art.ru'
    host: 'http://www.world-art.ru'

    # HTTP User-Agent
    # No default value
    client: 'My Custom Bot 1.0'

Usage

First get browser

$browser = $this->get('anime_db.world_art.browser');

Get info for anime Akira:

$content = $browser->get('/animation/animation.php?id=1');

Catch exceptions

use AnimeDb\Bundle\WorldArtBrowserBundle\Exception\BannedException;
use AnimeDb\Bundle\WorldArtBrowserBundle\Exception\NotFoundException;

try {
    $content = $browser->get('/animation/animation.php?id=1');
} catch (BannedException $e) {
    // you are banned
} catch (NotFoundException $e) {
    // page not found
} catch (\Exception $e) {
    // other exceptions
}

You can customize request options. See Guzzle Documentation.

License

This bundle is under the GPL v3 license. See the complete license in the file: LICENSE

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2015-10-01