leewillis77/open-exchange-rates-api
Composer 安装命令:
composer require leewillis77/open-exchange-rates-api
包简介
A PHP wrapper for the 'open exchange rates' API.
关键字:
README 文档
README
A PHP wrapper around the Open Exchange Rates API.
Installation
- Clone the repository
- Make sure you have composer set up and working
- Install dependencies by running
composer install - Copy the sample config file (
config/config.yml.sample) toconfig/config.yml - Update config/config.yml with your API credentials from "open exchange rates"
- API responses are cached in the cache/ subfolder - disallow access to this in your web server config.
Notes
- Docblocks are missing in many places - patches welcome
- PHPUnit is set up, and some test cases are present. More would be welcome.
- Requires PHP 5.3 or above.
Examples
See the examples folder for a simple example of how to use the API wrapper. This is designed to get you going, and is not a complete reference, or see the code sample below:
use OpenExchangeRates\Config; use OpenExchangeRates\Request\ConversionRequest; require('vendor/autoload.php'); $config = new Config('config/config.yml'); $request = new ConversionRequest($config); try { $response = $request->convert(100, 'USD', 'GBP'); } catch (\Exception $e) { die('Request exception received: '.$e->getMessage()); } echo "100 USD is " . $response . " GBP\n";
Disclaimer
This API is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the the developer(s) be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
Although every attempt is made to ensure quality, NO guarantees are given whatsoever of accuracy, validity, availability, or fitness for any purpose - please use at your own risk.
leewillis77/open-exchange-rates-api 适用场景与选型建议
leewillis77/open-exchange-rates-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 27 次下载、GitHub Stars 达 3, 最近一次更新时间为 2014 年 01 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「currency」 「exchange rate」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 leewillis77/open-exchange-rates-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 leewillis77/open-exchange-rates-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 leewillis77/open-exchange-rates-api 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A package for validating Google Cloud's JWT provided by webhooks
A PSR-7 compatible library for making CRUD API endpoints
Fixer.io data provider for Peso
TCMB Currenct Converter
Immutable PHP currency converter that's data-agnostic.
Adds Exchange Web Services Mail Support to Laravel.
统计信息
- 总下载量: 27
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2014-01-02