Ejemplo n.º 1
0
 /**
  * @param  null|AttachmentsFilter $data
  * @return null|void
  */
 public function attachments($data = null)
 {
     $action = 'attachments';
     $postMainParameters = null;
     if ($data instanceof AttachmentsFilter) {
         $this->addMainParameter($data->getId());
         $this->addSecondaryParameter('format', $data->getFormat());
         $this->addSecondaryParameter('max_width', $data->getMaxWidth());
         $this->addSecondaryParameter('max_height', $data->getMaxHeight());
     } elseif (is_int($data)) {
         $this->addMainParameter($data);
     }
     $response = $this->call($action, $postMainParameters);
     $result = $this->handleResponse($response);
     return $result;
 }