<?php

namespace onespace\tools\components\clients\interface;

use onespace\tools\components\clients\OneSpaceServiceClient;


/**
 * Required methods for API client components.
 * 
 * @deprecated for library
 */
interface OneSpaceClientInterface {

    /**
     * Returns the base OS Service Client.
     * 
     * @return  \onespace\tools\components\clients\OneSpaceServiceClient
     * 
     * @access  public
     */

    public function getClient(): OneSpaceServiceClient;


    /**
     * Returns the server URL used by the Client.
     * 
     * @return  string
     * 
     * @access  public
     */

    public function getServerUrl(): string;


    /**
     * Returns the previous request, mostly for debugging.
     * 
     * @return  string
     * 
     * @access  public
     */

    public function getPreviousRequest(): string;


    /**
     * Sets the last request, for debugging.
     * 
     * @param   \yii\httpclient\Request $request    The active request
     * 
     * @access  public
     */

    public function setLastRequest(\yii\httpclient\Request $request): void;
}
