Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
48c8adfa
Commit
48c8adfa
authored
May 13, 2015
by
六幻
Browse files
add getRawBlobCotent method
parent
409e5ea8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/messners/gitlab/api/RepositoryApi.java
View file @
48c8adfa
...
...
@@ -154,4 +154,20 @@ public class RepositoryApi extends AbstractApi {
Response
response
=
get
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
"projects"
,
projectId
,
"repository"
,
"blobs"
,
commitOrBranchName
);
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
));
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment