lbry.com/lib/thirdparty/LBRY.class.php
2017-02-21 21:44:25 -05:00

19 lines
No EOL
367 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['rate'];
}
}