/**
  * Tests the building of the file info
  */
 public function testBuildFileInfo()
 {
     $data = json_decode($this->fixture, true);
     $fileInfo = FileInfoBuilder::buildFileInfo($data);
     $this->assertInstanceOf('Ideneal\\OpenLoad\\Entity\\FileInfo', $fileInfo);
 }
Beispiel #2
0
 /**
  * Returns the files info
  *
  * @param array $files The files id
  *
  * @return FileInfo[]
  */
 public function getFilesInfo(array $files)
 {
     $params = $this->getAuthParams();
     $params['file'] = implode(',', $files);
     $response = $this->processRequest('file/info', $params);
     $results = $this->processResponse($response);
     $filesInfo = [];
     foreach ($results as $result) {
         $filesInfo[] = FileInfoBuilder::buildFileInfo($result);
     }
     return $filesInfo;
 }