You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
665 B
45 lines
665 B
<?php
|
|
|
|
namespace WCML\MultiCurrency\ExchangeRateServices;
|
|
|
|
/**
|
|
* Class OpenExchangeRates
|
|
*/
|
|
class OpenExchangeRates extends Service {
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getId() {
|
|
return 'openexchangerates';
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getName() {
|
|
return 'Open Exchange Rates';
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getUrl() {
|
|
return 'https://openexchangerates.org/';
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getApiUrl() {
|
|
return 'https://openexchangerates.org/api/latest.json?app_id=%1$s&base=%2$s&symbols=%3$s';
|
|
}
|
|
|
|
/**
|
|
* @return bool
|
|
*/
|
|
public function isKeyRequired() {
|
|
return true;
|
|
}
|
|
|
|
}
|
|
|