firelike/litres-api 问题修复 & 功能扩展

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

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

firelike/litres-api

Composer 安装命令:

composer require firelike/litres-api

包简介

Zend Framework module to consume LitRes APIs

README 文档

README

Build Status License

Introduction

Zend Framework module to consume LitRes API

Installation

Install the module using Composer into your application's vendor directory. Add the following line to your composer.json.

{
    "require": {
        "firelike/litres-api": "^1.0"
    }
}

Configuration

Enable the module in your application.config.php file.

return array(
    'modules' => array(
        'Firelike\LitRes'
    )
);

Copy and paste the litres.local.php.dist file to your config/autoload folder and customize it with your credentials and other configuration settings. Make sure to remove .dist from your file.Your litres.local.php might look something like the following:

<?php
return [
    'litres_service' => [
        'log'=>[
            'enable'=>false,
            'message_formats'=>[
                '{method} {uri} HTTP/{version} {req_body}',
                'RESPONSE: {code} - {res_body}',
            ],
            'logger'=>[
                 'stream' => 'php://output',
            ]
        ]
    ]
];

Usage

Calling from your code:

        use Firelike\LitRes\Request\AbstractRequest;
        use Firelike\LitRes\Request\Browser as BrowserRequest;
        use Firelike\LitRes\Service\LitResService;

        
        $request = new BrowserRequest();
        $request->setSearch('King')
            ->setLang('en')
            ->setLimit(25);

        $service = new LitResService();
        $result = $service->browser($request);
        
        $numberOfRecords = $result->toArray()['results'];
        var_dump($numberOfRecords);

        $records= $result->toArray()['fb2-book'];
        var_dump($records);
        

Using the console:

php public/index.php litres browser --search=King -v

Implemented Service Methods:

  • browser
  • genres
  • persons

Links

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2016-12-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固