public class GitHubChecker extends VersionChecker
| Constructor and Description |
|---|
GitHubChecker(@NotNull java.lang.String gitHubUserRepository)
Constructor for the GitHub checker.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
allVersions()
Gather a list of all available versions for the given repository.
|
java.util.List<java.lang.String> |
getAssetsDownloadUrls(@NotNull java.lang.String requestedVersion)
Get the asset download URLs for a particular tag/version.
|
java.lang.String |
getDownloadUrl(@NotNull java.lang.String version)
Get the URL for the given release version.
|
java.lang.String |
latestVersion(boolean checkForPreRelease)
Get the latest regular release.
|
void |
refresh() |
protected void |
setRepository() |
checkForUpdate, getAllVersions, getObjectMapper, getResponse, latestAlpha, latestBeta, setAllVersionspublic GitHubChecker(@NotNull
@NotNull java.lang.String gitHubUserRepository)
throws java.net.MalformedURLException
gitHubUserRepository - String. GitHub user/repository combination. For example Griefed/ServerPackCreatorjava.net.MalformedURLException - Thrown if the resulting URL is malformed or otherwise invalid.public void refresh()
throws java.io.IOException
refresh in class VersionCheckerjava.io.IOExceptionpublic java.util.List<java.lang.String> allVersions()
allVersions in class VersionCheckernull is returned.public java.lang.String latestVersion(boolean checkForPreRelease)
latestVersion in class VersionCheckercheckForPreRelease - Boolean. Whether to include alpha and beta releases for latest release versions.no_release is returned.public java.lang.String getDownloadUrl(@NotNull
@NotNull java.lang.String version)
getDownloadUrl in class VersionCheckerversion - String. The version for which to get the URL to.protected void setRepository()
throws java.io.IOException
setRepository in class VersionCheckerjava.io.IOExceptionpublic java.util.List<java.lang.String> getAssetsDownloadUrls(@NotNull
@NotNull java.lang.String requestedVersion)
getAssetsDownloadUrls in class VersionCheckerrequestedVersion - String. The version you want to retrieve the asset download URLs for.