kadekjayak/bi-rates

Simple library to get currency rate from Bank Indonesia

v1.0 2019-07-20 02:51 UTC

This package is auto-updated.

Last update: 2024-09-20 15:41:14 UTC


README

Library sederhana untuk mengambil kurs mata uang (Currency Rate) dari website Bank Indonesia.

Install

$ composer require kadekjayak/bi-rates

Usage

$BiRates = new \Kadekjayak\BiRates\BiRates();

// Get All Rates
$BiRates->getRates();

// Get Specific Rates
$BiRates->getRates('USD');

// Output All Rates
Array (
    ....
    [AUD] => Array
        (
            [sell] => 9884.58
            [buy] => 9784.23
        )
    ....
)

// Output Specific Rates
Array
(
    [sell] => 9884.58
    [buy] => 9784.23
)

Testing

$ phpunit

License

The MIT License (MIT). Please see License File for more information.