承接 fedeisas/dolar-blue 相关项目开发

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

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

fedeisas/dolar-blue

Composer 安装命令:

composer require fedeisas/dolar-blue

包简介

Package to fetch latest USD conversion rate on Argentina's black market

README 文档

README

Travis Badge Coverage Status Latest Stable Version Latest Unstable Version Total Downloads License

Why?

Because Argentina has a black market for currency exchange. And this makes it easy to retrieve the current USD conversion rate from different sources. And also because I needed something small to talk about Package Development and testing on this meetup.

Requirements

  • PHP >= 5.4

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require `fedeisas/dolar-blue.

{
  "require": {
        ...
        "fedeisas/dolar-blue": "1.*"
        ...
    },
    "minimum-stability" : "dev"
}

Next, update Composer from the Terminal:

$ composer update

Once this operation completes, the final step is to add the service provider. Open app/config/app.php, and add a new item to the providers array.

'providers' => array(
    ...
    'Fedeisas\LaravelDolarBlue\LaravelDolarBlueServiceProvider',
)

Optionally you can also add the Facade to the aliases array on app/config/app.php:

'aliases' => array(
    ...
    'DolarBlue' => 'Fedeisas\LaravelDolarBlue\Facade\LaravelDolarBlue',
)

Providers

Usage

use Fedeisas\DolarBlue\DolarBlue;
use GuzzleHttp\Client;

$service = new DolarBlue(new Client);
$result = $service->get('DolarBlue'); // or $service->DolarBlue();
// returns
// array(
//   'buy' => '10.15',
//   'sell' => '10.55',
//   'timestamp' => 1399080004
// )

Or you can use magic methods:

$result = $service->LaNacion();
$result = $service->DolarBlue();
$result = $service->BlueLytics();

Contributing

$ composer install --dev
$ ./vendor/bin/phpunit

In addition to a full test suite, there is Travis integration.

Found a bug?

Please, let me know! Send a pull request or a patch. Questions? Ask! I will respond to all filed issues.

Inspiration

I needed an idea for a small library, and I borrowed it from a friend who has done something similar for NodeJS. You should check it out: https://github.com/matiu/dolar-blue

License

This package is open-sourced software licensed under the MIT license

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-05-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固