lbry.com/lib/thirdparty/LBRY.class.php
Jeremy Kauffman ab45fce4ff it works?
2017-02-26 14:59:44 -05:00

19 lines
No EOL
383 B
PHP

<?php
class LBRY
{
public static function getApiUrl($endpoint)
{
return Config::get('lbry_api_server') . $endpoint;
}
public static function getLBCtoUSDRate()
{
$response = CurlWithCache::get(static::getApiUrl('/lbc/exchange_rate'), [], [
'cache' => 3600, //one hour
'json_response' => true
]);
return $response['data']['lbc_usd'] ?? 0;
}
}