public class RepositoryFileApi extends AbstractApi
Constructor and Description |
---|
RepositoryFileApi(GitLabApi gitLabApi) |
Modifier and Type | Method and Description |
---|---|
RepositoryFile |
createFile(RepositoryFile file,
Integer projectId,
String branchName,
String commitMessage)
Create new file in repository
POST /projects/:id/repository/files
file_path (required) - Full path to new file.
|
void |
deleteFile(String filePath,
Integer projectId,
String branchName,
String commitMessage)
Delete existing file in repository
DELETE /projects/:id/repository/files
file_path (required) - Full path to file.
|
RepositoryFile |
getFile(String filePath,
Integer projectId,
String ref)
Get file from repository.
|
RepositoryFile |
updateFile(RepositoryFile file,
Integer projectId,
String branchName,
String commitMessage)
Update existing file in repository
PUT /projects/:id/repository/files
file_path (required) - Full path to new file.
|
addFormParam, addFormParam, delete, delete, get, get, getApiClient, handle, post, post, post, put, put, validate
public RepositoryFileApi(GitLabApi gitLabApi)
public RepositoryFile getFile(String filePath, Integer projectId, String ref) throws GitLabApiException
filePath
- (required) - Full path to new file. Ex. lib/class.rbprojectId
- ref
- (required) - The name of branch, tag or commitGitLabApiException
public RepositoryFile createFile(RepositoryFile file, Integer projectId, String branchName, String commitMessage) throws GitLabApiException
file
- projectId
- branchName
- commitMessage
- GitLabApiException
public RepositoryFile updateFile(RepositoryFile file, Integer projectId, String branchName, String commitMessage) throws GitLabApiException
file
- projectId
- branchName
- commitMessage
- GitLabApiException
public void deleteFile(String filePath, Integer projectId, String branchName, String commitMessage) throws GitLabApiException
filePath
- projectId
- branchName
- commitMessage
- GitLabApiException
Copyright © 2017. All rights reserved.