| Server IP : 5.129.245.98 / Your IP : 216.73.217.19 Web Server : Apache/2.4.66 (Debian) System : Linux 1b8c17c336b9 6.8.0-111-generic #111-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 11 23:16:02 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/html/wp-content/plugins/content-egg/application/libs/skimlinks/ |
Upload File : |
<?php
namespace ContentEgg\application\libs\skimlinks;
defined('\ABSPATH') || exit;
use ContentEgg\application\libs\RestClient;
/**
* SkimlinksMerchant class file
*
* @author keywordrush.com <support@keywordrush.com>
* @link https://www.keywordrush.com
* @copyright Copyright © 2025 keywordrush.com
* Skimlinks Merchant API
* @link: http://developers.skimlinks.com/merchant.html
*
*/
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'RestClient.php';
class SkimlinksMerchant extends RestClient
{
const API_URI_BASE = 'https://merchants.skimapis.com/v3';
private $apikey;
private $account_type;
private $account_id;
protected $_responseTypes = array(
'json',
);
public function __construct($apikey, $account_id, $account_type = 'publisher_admin')
{
$this->apikey = $apikey;
$this->account_id = $account_id;
$this->account_type = $account_type;
$this->setUri(self::API_URI_BASE);
$this->setResponseType('json');
}
public function search($query, array $params)
{
$params['search'] = $query;
$response = $this->restGet('/offers', $params);
return $this->_decodeResponse($response);
}
public function restGet($path, array $query = null)
{
$query['apikey'] = $this->apikey;
$query['account_id'] = $this->account_id;
$query['account_type'] = $this->account_type;
return parent::restGet($path, $query);
}
}