<?php
namespace SPAATG\Controller\Api;

if (!defined('ABSPATH')) {
	exit; // Exit if accessed directly.
}

use SPAATG\Model\Queue\QueueItem as QueueItem;

class ApiController extends RequestManager
{
	const ERR_TIMEOUT = -903;

	public function processMediaItem(QueueItem $qItem)
	{
		$qItem->addResult($this->disabledResult);
	}

	public function processActionItem(QueueItem $qItem)
	{
		$qItem->addResult($this->disabledResult);
	}

	public function dumpMediaItem(QueueItem $qItem)
	{
		return false;
	}

	protected function handleResponse(QueueItem $qItem, $response)
	{
		return $this->disabledResult;
	}

	private $disabledResult = [
		'apiStatus' => self::STATUS_NOT_API,
		'is_done' => true,
		'is_error' => false,
	];
}
