ApaiIO\ApaiIO::runOperation PHP Method

runOperation() public method

Runs the given operation.
public runOperation ( ApaiIO\Operations\OperationInterface $operation ) : mixed
$operation ApaiIO\Operations\OperationInterface The operationobject
return mixed
    public function runOperation(OperationInterface $operation)
    {
        $request = $this->configuration->getRequest();
        $response = $request->perform($operation, $this->configuration);
        return $this->applyResponseTransformer($response);
    }

Usage Example

Example #1
0
 /**
  * @param $asin
  * @return mixed
  * @throws \Exception
  */
 protected function runImageLookup($asin)
 {
     $lookup = new Lookup();
     $lookup->setItemId($asin);
     $lookup->setResponseGroup(array('Images'));
     return $this->apaiIO->runOperation($lookup);
 }
All Usage Examples Of ApaiIO\ApaiIO::runOperation