Package net.mcreator.io.net.api
Interface IWebAPI
- All Superinterfaces:
IUpdateAPI
- All Known Implementing Classes:
D8WebAPI
-
Method Summary
Modifier and TypeMethodDescriptionvoid
getModOfTheWeekData
(CompletableFuture<String[]> data) API requestgetSearchURL
(String searchTerm) API URL generatorvoid
getWebsiteNews
(CompletableFuture<String[]> data) API requestboolean
initAPI()
Initializes API, called on MCreator launch, while loading dataMethods inherited from interface net.mcreator.io.net.api.update.IUpdateAPI
getUpdateInfo
-
Method Details
-
initAPI
boolean initAPI()Initializes API, called on MCreator launch, while loading data- Returns:
- true if the connection was successful - can be used for internet connectivity testing
-
getWebsiteNews
API request -
getModOfTheWeekData
API requestReturns mod of the week data in String array format, where index
- [0] - mod of the week name
- [1] - mod of the week page URL
- [2] - mod of the week Minecraft version
- [3] - mod of the week author URL
- [4] - mod of the week picture URL
-
getSearchURL
API URL generator- Parameters:
searchTerm
- Terms that should be searched- Returns:
- Search URL for the website for the given term
-