public class ContentsService extends GitHubService
ACCEPT_FULL, ACCEPT_HTML, ACCEPT_PREVIEW_DRAX, ACCEPT_PREVIEW_IRONMAN, ACCEPT_PREVIEW_LOKI, ACCEPT_RAW, ACCEPT_TEXT, client| Constructor and Description |
|---|
ContentsService()
Create contents service
|
ContentsService(GitHubClient client)
Create contents service
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<RepositoryContents> |
getContents(IRepositoryIdProvider repository)
Get contents at the root of the given repository on master branch
|
java.util.List<RepositoryContents> |
getContents(IRepositoryIdProvider repository,
java.lang.String path)
Get contents at path in the given repository on master branch
|
java.util.List<RepositoryContents> |
getContents(IRepositoryIdProvider repository,
java.lang.String path,
java.lang.String ref)
Get contents of path at reference in given repository
|
RepositoryContents |
getReadme(IRepositoryIdProvider repository)
Get repository README
|
RepositoryContents |
getReadme(IRepositoryIdProvider repository,
java.lang.String ref)
Get repository README
|
check, createPagedRequest, createPagedRequest, createPageIterator, createRequest, getAll, getAll, getClient, getId, verifyRepositorypublic ContentsService()
public ContentsService(GitHubClient client)
client - public RepositoryContents getReadme(IRepositoryIdProvider repository) throws java.lang.Exception
repository - java.lang.Exceptionpublic RepositoryContents getReadme(IRepositoryIdProvider repository, java.lang.String ref) throws java.io.IOException
repository - ref - java.io.IOExceptionpublic java.util.List<RepositoryContents> getContents(IRepositoryIdProvider repository) throws java.io.IOException
repository - java.io.IOExceptionpublic java.util.List<RepositoryContents> getContents(IRepositoryIdProvider repository, java.lang.String path) throws java.io.IOException
repository - path - java.io.IOExceptionpublic java.util.List<RepositoryContents> getContents(IRepositoryIdProvider repository, java.lang.String path, java.lang.String ref) throws java.io.IOException
For file paths this will return a list with one entry corresponding to the file contents at the given path
repository - path - ref - java.io.IOException