spitoglou/multi-api
Composer 安装命令:
composer require spitoglou/multi-api
包简介
Multiple response formats
README 文档
README
Laravel 5.2 Multi Api Package
spitoglou/multi-api
This package was initially developed for personal (and colleague) use.
It provides the necessary functionality to produce api responses in JSON, XML or HTML (simple table) formats. The api consumer determines the format of the response he/she needs by setting the "Accept" header of the request accordingly ("application/json", "application/custom+xml","application/text" respectively).
Install
Via Composer
$ composer require spitoglou/multi-api
Usage
Normal Response
$array = [["name"=>"Stavros", "surname"=>"Pitoglou],["name"=>"John", "surname"=>"Doe"]; $sender = new Spitoglou\MultiApi\Sender($array); $sender->finalSend();
Error
$array = ["errorCode"=>"654987", "errorDescription"=>"Some Exotic Error] $sender = new Spitoglou\MultiApi\Sender($array); $sender->sendError(500);
Change log
Please see CHANGELOG for more information what has changed recently.
Testing
Have Not Added Tests yet...
Security
If you discover any security related issues, please email s.pitoglou@csl.gr instead of using the issue tracker.
Credits
- [Stavros Pitoglou][link-author]
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 35
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-04-10