public function listRevisions($path, array $params = [])
    {
        //Set the Path
        $params['path'] = $path;

        //Fetch the Revisions
        $response = $this->postToAPI('/files/list_revisions', $params);

        //The file metadata of the entries, returned by this
        //endpoint doesn't include a '.tag' attribute, which
        //is used by the ModelFactory to resolve the correct
        //model. But since we know that revisions returned
        //are file metadata objects, we can explicitly cast
        //them as \Ziggeo\BoxContent\Content\BoxFileMetadata manually.
        $body = $response->getDecodedBody();
        $entries = isset($body['entries']) ? $body['entries'] : [];
        $processedEntries = [];

        foreach ($entries as $entry) {
            $processedEntries[] = new BoxFileMetadata($entry);
        }

        return new ModelCollection($processedEntries);
    }
public function listRevisions($path, array $params = [])
    {
        //Set the Path
        $params['path'] = $path;

        //Fetch the Revisions
        $response = $this->postToAPI('/files/list_revisions', $params);

        //The file metadata of the entries, returned by this
        //endpoint doesn't include a '.tag' attribute, which
        //is used by the ModelFactory to resolve the correct
        //model. But since we know that revisions returned
        //are file metadata objects, we can explicitly cast
        //them as \Ziggeo\BoxContent\Content\BoxFileMetadata manually.
        $body = $response->getDecodedBody();
        $entries = isset($body['entries']) ? $body['entries'] : [];
        $processedEntries = [];

        foreach ($entries as $entry) {
            $processedEntries[] = new BoxFileMetadata($entry);
        }

        return new ModelCollection($processedEntries);
    }
public function listRevisions ( $ path , array $ params = [ ] ) { //Set the Path $ params [ 'path' ] = $ path ; //Fetch the Revisions $ response = $ this -> postToAPI ( '/files/list_revisions' , $ params ) ; //The file metadata of the entries, returned by this //endpoint doesn't include a '.tag' attribute, which //is used by the ModelFactory to resolve the correct //model. But since we know that revisions returned //are file metadata objects, we can explicitly cast //them as \Ziggeo\BoxContent\Content\BoxFileMetadata manually. $ body = $ response -> getDecodedBody ( ) ; $ entries = isset ( $ body [ 'entries' ] ) ? $ body [ 'entries' ] : [ ] ; $ processedEntries = [ ] ; foreach ( $ entries as $ entry ) { $ processedEntries [ ] = new BoxFileMetadata ( $ entry ) ; } return new ModelCollection ( $ processedEntries ) ; }
Get Revisions of a File

@param  string $path   Path to the file
@param  array  $params Additional Params

@link https://www.box.com/developers/documentation/http/documentation#files-list_revisions

@return \Ziggeo\BoxContent\Content\ModelCollection
Get Revisions of a File