RepositoryFilesApi

Author

sunlulu.tomato

Functions

Link copied to clipboard
@POST(value = "projects/{id}/repository/files/{file_path}")
abstract fun createNewFile(@Path(value = "id") id: String, @Path(value = "file_path") filePath: String, @Body createFileRequest: FileOperatorRequest): Result<FileOperatorResponse>
Link copied to clipboard
@DELETE(value = "projects/{id}/repository/files/{file_path}")
abstract suspend fun deleteFile(@Path(value = "id") id: String, @Path(value = "file_path") filePath: String, @Body fileOperatorRequest: FileOperatorRequest): Result<Unit>
Link copied to clipboard
@GET(value = "projects/{id}/repository/files/{file_path}")
abstract suspend fun getFile(@Path(value = "id") id: String, @Path(value = "file_path") filePath: String, @Query(value = "ref") ref: String): Result<RepositoryFile>
Link copied to clipboard
@GET(value = "projects/{id}/repository/files/{file_path}/blame")
abstract suspend fun getFileBlame(@Path(value = "id") id: String, @Path(value = "file_path") filePath: String, @Query(value = "ref") ref: String, @Query(value = "range[end]") rangeEnd: Int, @Query(value = "range[start]") rangeStart: Int, @Query(value = "range") range: String): Result<FileBlameInfo>
Link copied to clipboard
@GET(value = "projects/{id}/repository/files/{file_path}/raw")
abstract suspend fun getRawFile(@Path(value = "id") id: String, @Path(value = "file_path") filePath: String, @Query(value = "ref") ref: String? = null, @Query(value = "lfs") lfs: Boolean? = null): Result<RepositoryFile>
Link copied to clipboard
@PUT(value = "projects/{id}/repository/files/{file_path}")
abstract suspend fun updateExistingFile(@Path(value = "id") id: String, @Path(value = "file_path") filePath: String, @Body updateFileRequest: FileOperatorRequest): Result<FileOperatorResponse>