public class MarkdownService extends GitHubService
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MODE_GFM
GitHub-flavored Markdown mode
|
static java.lang.String |
MODE_MARKDOWN
Default Markdown mode
|
ACCEPT_FULL, ACCEPT_HTML, ACCEPT_PREVIEW_DRAX, ACCEPT_PREVIEW_IRONMAN, ACCEPT_PREVIEW_LOKI, ACCEPT_RAW, ACCEPT_TEXT, client| Constructor and Description |
|---|
MarkdownService()
Create Markdown service
|
MarkdownService(GitHubClient client)
Create Markdown service for client
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getHtml(java.lang.String text,
java.lang.String mode)
Get HTML for given Markdown text
|
java.lang.String |
getRepositoryHtml(IRepositoryIdProvider repo,
java.lang.String text)
Get HTML for given Markdown text scoped to given repository context
|
java.io.InputStream |
getRepositoryStream(IRepositoryIdProvider repo,
java.lang.String text)
Get stream of HTML for given Markdown text scoped to given repository
context
|
java.io.InputStream |
getStream(java.lang.String text,
java.lang.String mode)
Get stream of HTML for given Markdown text
|
check, createPagedRequest, createPagedRequest, createPageIterator, createRequest, getAll, getAll, getClient, getId, verifyRepositorypublic static final java.lang.String MODE_GFM
public static final java.lang.String MODE_MARKDOWN
public MarkdownService()
public MarkdownService(GitHubClient client)
client - public java.io.InputStream getRepositoryStream(IRepositoryIdProvider repo, java.lang.String text) throws java.io.IOException
repo - text - java.io.IOExceptionpublic java.lang.String getRepositoryHtml(IRepositoryIdProvider repo, java.lang.String text) throws java.io.IOException
repo - text - java.io.IOExceptionpublic java.io.InputStream getStream(java.lang.String text,
java.lang.String mode)
throws java.io.IOException
Use getRepositoryStream(IRepositoryIdProvider, String) if you
want the Markdown scoped to a specific repository.
text - mode - java.io.IOExceptionpublic java.lang.String getHtml(java.lang.String text,
java.lang.String mode)
throws java.io.IOException
Use getRepositoryHtml(IRepositoryIdProvider, String) if you want
the Markdown scoped to a specific repository.
text - mode - java.io.IOException