<?php

namespace App\Integrations\Semrush\Adapters;

use App\Integrations\Common\ConfigurableInterface;
use App\Integrations\Semrush\Requests\RequestInterface;
use App\Integrations\Semrush\Response;

/**
 * Interface for client adapters.
 *
 * The goal of an adapter is to accept a query, execute it and return the right
 * result object.
 *
 * The adapter structure allows for varying implementations of this task.
 *
 * Most adapters will use some sort of HTTP client. In that case the
 * query request builders and query response parsers can be used to simplify
 * HTTP communication.
 *
 * However an adapter may also implement all logic by itself if needed.
 */
interface AdapterInterface extends ConfigurableInterface
{
    /**
     * Execute a request.
     *
     * @param RequestInterface $request
     *
     * @return Response
     */
    public function execute(RequestInterface $request);
}
