FileApi
extends FileApi
in package
Use API to keep the source files up to date, check on file revisions
Table of Contents
Methods
- buildReviewedSourceFiles() : ReviewedSourceFileBuild
- Build Reviewed Source Files
- checkReviewedSourceFilesBuildStatus() : ReviewedSourceFileBuild
- Check Reviewed Source Files Build Status
- create() : File
- Add File
- delete() : mixed
- Delete File
- download() : DownloadFile|null
- Download File
- downloadPreview() : DownloadFilePreview|null
- Download Preview File
- downloadReviewedSourceFiles() : DownloadFile
- edit() : File|null
- Edit File
- get() : File|null
- Get File Info
- getRevision() : FileRevision|null
- Get File Revision
- list() : ModelCollection
- List Files
- listReviewedSourceFilesBuilds() : ModelCollection
- List Reviewed Source Files Builds
- restore() : File
- Restore file to revision
- revisions() : ModelCollection
- List File Revisions
- update() : File
- Update File
Methods
buildReviewedSourceFiles()
Build Reviewed Source Files
public
buildReviewedSourceFiles(int $projectId[, array<string|int, mixed> $data = [] ]) : ReviewedSourceFileBuild
Parameters
- $projectId : int
- $data : array<string|int, mixed> = []
-
integer $data[branchId]
Tags
Return values
ReviewedSourceFileBuildcheckReviewedSourceFilesBuildStatus()
Check Reviewed Source Files Build Status
public
checkReviewedSourceFilesBuildStatus(int $projectId, int $buildId) : ReviewedSourceFileBuild
Parameters
- $projectId : int
- $buildId : int
Tags
Return values
ReviewedSourceFileBuildcreate()
Add File
public
create(int $projectId, array<string|int, mixed> $data) : File
Parameters
- $projectId : int
- $data : array<string|int, mixed>
-
integer $data[storageId] required
string $data[name] required
integer $data[branchId] Can't be used with directoryId in same request
integer $data[directoryId] Can't be used with branchId in same request
string $data[title]
string $data[context]
string $data[type]
array $data[importOptions]
array $data[exportOptions]
Tags
Return values
Filedelete()
Delete File
public
delete(int $projectId, int $fileId) : mixed
Parameters
- $projectId : int
- $fileId : int
Tags
download()
Download File
public
download(int $projectId, int $fileId) : DownloadFile|null
Parameters
- $projectId : int
- $fileId : int
Tags
Return values
DownloadFile|nulldownloadPreview()
Download Preview File
public
downloadPreview(int $projectId, int $fileId) : DownloadFilePreview|null
Parameters
- $projectId : int
- $fileId : int
Tags
Return values
DownloadFilePreview|nulldownloadReviewedSourceFiles()
public
downloadReviewedSourceFiles(int $projectId, int $buildId) : DownloadFile
Parameters
- $projectId : int
- $buildId : int
Return values
DownloadFileedit()
Edit File
public
edit(File $file) : File|null
Parameters
- $file : File
Tags
Return values
File|nullget()
Get File Info
public
get(int $projectId, int $fileId) : File|null
Parameters
- $projectId : int
- $fileId : int
Tags
Return values
File|nullgetRevision()
Get File Revision
public
getRevision(int $projectId, int $fileId, int $revision) : FileRevision|null
Parameters
- $projectId : int
- $fileId : int
- $revision : int
Tags
Return values
FileRevision|nulllist()
List Files
public
list(int $projectId[, array<string|int, mixed> $params = [] ]) : ModelCollection
Parameters
- $projectId : int
- $params : array<string|int, mixed> = []
-
integer $params[branchId] Can't be used with directoryId in the same request
integer $params[directoryId] Can't be used with branchId in the same request
mixed $params[recursion] Works only when directoryId or branchId parameter is specified
integer $params[limit]
integer $params[offset]
Tags
Return values
ModelCollectionlistReviewedSourceFilesBuilds()
List Reviewed Source Files Builds
public
listReviewedSourceFilesBuilds(int $projectId[, array<string|int, mixed> $params = [] ]) : ModelCollection
Parameters
- $projectId : int
- $params : array<string|int, mixed> = []
-
integer $params[branchId]
integer $params[limit]
integer $params[offset]
Tags
Return values
ModelCollectionrestore()
Restore file to revision
public
restore(int $projectId, int $fileId, array<string|int, mixed> $data) : File
Parameters
- $projectId : int
- $fileId : int
- $data : array<string|int, mixed>
-
array $data[revisionId] required
Tags
Return values
Filerevisions()
List File Revisions
public
revisions(int $projectId, int $fileId) : ModelCollection
Parameters
- $projectId : int
- $fileId : int
Tags
Return values
ModelCollectionupdate()
Update File
public
update(int $projectId, int $fileId, array<string|int, mixed> $data) : File
Parameters
- $projectId : int
- $fileId : int
- $data : array<string|int, mixed>
-
array $data[storageId] required
array $data[updateOption]
array $data[importOptions]
array $data[exportOptions]