Class ModrinthAPI

java.lang.Object
masecla.modrinth4j.main.ModrinthAPI

public class ModrinthAPI extends Object
The main class for the Modrinth API.
  • Constructor Details

    • ModrinthAPI

      public ModrinthAPI()
  • Method Details

    • unlimited

      @Deprecated public static ModrinthAPI unlimited(UserAgent agent, String apiKey)
      Deprecated.
      Returns a client which will send unlimited requests.
      Parameters:
      agent - - The user agent to use
      apiKey - - The API key to use
      Returns:
      - A client which will send unlimited requests.
    • unlimited

      @Deprecated public static ModrinthAPI unlimited(UserAgent agent, String url, String apiKey)
      Deprecated.
      Returns a client which will send unlimited requests.
      Parameters:
      agent - - The user agent to use
      url - - The URL to use
      apiKey - - The API key to use
      Returns:
      - A client which will send unlimited requests.
    • unlimited

      @Deprecated public static ModrinthAPI unlimited(UserAgent agent, String url, String apiKey, long timeout)
      Returns a client which will send unlimited requests.
      Parameters:
      agent - - The user agent to use
      url - - The URL to use
      apiKey - - The API key to use
      timeout - - The timeout to use in milliseconds
      Returns:
      - A client which will send unlimited requests.
    • rateLimited

      public static ModrinthAPI rateLimited(UserAgent agent, String apiKey)
      Returns a client which will send requests and adjust speed based on rate limits
      Parameters:
      agent - - The user agent to use
      apiKey - - The API key to use
      Returns:
      - A client which will send requests and adjust speed based on rate
    • rateLimited

      public static ModrinthAPI rateLimited(UserAgent agent, String url, String apiKey)
      Returns a client which will send requests and adjust speed based on rate limits
      Parameters:
      agent - - The user agent to use
      url - - The base URL to use
      apiKey - - The API key to use
      Returns:
      - A client which will send requests and adjust speed based on rate
    • rateLimited

      public static ModrinthAPI rateLimited(UserAgent agent, String url, String apiKey, long timeout)
      Returns a client which will send requests and adjust speed based on rate limits
      Parameters:
      agent - - The user agent to use
      url - - The base URL to use
      apiKey - - The API key to use
      timeout - - The timeout to use in milliseconds
      Returns:
      - A client which will send requests and adjust speed based on rate
    • search

      Executes a search request.
      Parameters:
      request - - The request to execute
      Returns:
      - A future which will return the response
    • projects

      public ProjectEndpoints projects()
      Returns the project endpoints.
      Returns:
      - The project endpoints
    • versions

      public VersionEndpoints versions()
      Returns the version endpoints.
      Returns:
      - The version endpoints
    • users

      public UserEndpoints users()
      Returns the user endpoints.
      Returns:
      - The user endpoints
    • teams

      public TeamsEndpoints teams()
      Returns the team endpoints.
      Returns:
      - The team endpoints
    • tags

      public TagsEndpoints tags()
      Returns the tag endpoints.
      Returns:
      - The tag endpoints