Class D8WebAPI

java.lang.Object
net.mcreator.io.net.api.D8WebAPI
All Implemented Interfaces:
IWebAPI, IUpdateAPI

public class D8WebAPI extends Object implements IWebAPI
  • Constructor Details

    • D8WebAPI

      public D8WebAPI()
  • Method Details

    • initAPI

      public boolean initAPI()
      Description copied from interface: IWebAPI
      Initializes API, called on MCreator launch, while loading data
      Specified by:
      initAPI in interface IWebAPI
      Returns:
      true if the connection was successful - can be used for internet connectivity testing
    • getUpdateInfo

      @Nullable public UpdateInfo getUpdateInfo()
      Specified by:
      getUpdateInfo in interface IUpdateAPI
    • getSearchURL

      public String getSearchURL(String searchTerm)
      Description copied from interface: IWebAPI
      API URL generator
      Specified by:
      getSearchURL in interface IWebAPI
      Parameters:
      searchTerm - Terms that should be searched
      Returns:
      Search URL for the website for the given term
    • getWebsiteNews

      public void getWebsiteNews(CompletableFuture<String[]> data)
      Description copied from interface: IWebAPI
      API request
      Specified by:
      getWebsiteNews in interface IWebAPI
    • getModOfTheWeekData

      public void getModOfTheWeekData(CompletableFuture<String[]> data)
      API request

      Returns as promise 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
      Specified by:
      getModOfTheWeekData in interface IWebAPI