承接 anime-db/shikimori-browser-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

anime-db/shikimori-browser-bundle

Composer 安装命令:

composer require anime-db/shikimori-browser-bundle

包简介

Plugin Shikimori for the catalog Anime DB

README 文档

README

Shikimori

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

Shikimori.org API browser

Read API documentation here: http://shikimori.org/api/doc

Installation

Pretty simple with Composer, run:

composer anime-db/shikimori-browser-bundle

Configuration

anime_db_shikimori_browser:
    # API host
    # As a default used 'https://shikimori.org'
    host: 'https://shikimori.org'

    # Prefix for API resurces
    # As a default used '/api/'
    prefix: '/api/'

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

Usage

First get browser

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

List animes (docs)

$animes = $browser->get('animes', ['query' => ['limit' => 10]]);

or

$animes = $browser->get('animes?limit=10');

Mark all messages as read (docs)

$response = $browser->post('messages/read_all');

Update a message (docs)

$response = $browser->patch('messages/12', [
    'body' => [
        'message' => [
            'body' => 'blablabla',
        ],
    ],
]);

Update a comment (docs)

$response = $browser->put('comments/8', [
    'body' => [
        'message' => [
            'body' => 'blablabla',
        ],
    ],
]);

Destroy a message (docs)

$browser->delete('messages/12');

Catch exceptions

use AnimeDb\Bundle\ShikimoriBrowserBundle\Exception\NotFoundException;

try {
    $content = $browser->get('animes/1');
} catch (NotFoundException $e) {
    // anime not found
} catch (\Exception $e) {
    // other exceptions
}

You can customize request options. See Guzzle Documentation.

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2014-04-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固