<?php

namespace App\Integrations\Shutterstock;

use App\Integrations\Common\Configurable;

final class Client extends Configurable
{
    /**
     * @param $request
     *
     * @return mixed
     */
    public function execute($request)
    {
        $request->setOption('key', $this->getApiKey());

        return $this->getAdapter()->execute($request);
    }

    private function getAdapter()
    {
        return $this->getOption('adapter');
    }

    private function getApiKey()
    {
        return $this->getOption('apiKey');
    }
}
