Commit 48c8adfa authored by 六幻's avatar 六幻
Browse files

add getRawBlobCotent method

parent 409e5ea8
...@@ -154,4 +154,20 @@ public class RepositoryApi extends AbstractApi { ...@@ -154,4 +154,20 @@ public class RepositoryApi extends AbstractApi {
Response response = get(Response.Status.OK, formData.asMap(), "projects", projectId, "repository", "blobs", commitOrBranchName); Response response = get(Response.Status.OK, formData.asMap(), "projects", projectId, "repository", "blobs", commitOrBranchName);
return (response.readEntity(String.class)); return (response.readEntity(String.class));
} }
/**
* Get the raw file contents for a blob by blob SHA.
*
* GET /projects/:id/repository/raw_blobs/:sha
*
* @param projectId
* @param sha
* @return the raw file contents for the blob
* @throws GitLabApiException
*/
public String getRawBlobCotent(Integer projectId, String sha) throws GitLabApiException{
Response response = get(Response.Status.OK, null, "projects", projectId, "repository", "raw_blobs", sha);
return (response.readEntity(String.class));
}
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment