Package masecla.modrinth4j.main
Class ModrinthAPI
java.lang.Object
masecla.modrinth4j.main.ModrinthAPI
The main class for the Modrinth API.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprojects()Returns the project endpoints.static ModrinthAPIrateLimited(UserAgent agent, String apiKey) Returns a client which will send requests and adjust speed based on rate limitsstatic ModrinthAPIrateLimited(UserAgent agent, String url, String apiKey) Returns a client which will send requests and adjust speed based on rate limitsstatic ModrinthAPIrateLimited(UserAgent agent, String url, String apiKey, long timeout) Returns a client which will send requests and adjust speed based on rate limitssearch(SearchEndpoint.SearchRequest request) Executes a search request.tags()Returns the tag endpoints.teams()Returns the team endpoints.static ModrinthAPIDeprecated.static ModrinthAPIDeprecated.- UserateLimited(UserAgent, String, String)instead.static ModrinthAPIDeprecated.- UserateLimited(UserAgent, String, String, long)instead.users()Returns the user endpoints.versions()Returns the version endpoints.
-
Constructor Details
-
ModrinthAPI
public ModrinthAPI()
-
-
Method Details
-
unlimited
Deprecated.- UserateLimited(UserAgent, String)instead.Returns a client which will send unlimited requests.- Parameters:
agent- - The user agent to useapiKey- - The API key to use- Returns:
- - A client which will send unlimited requests.
-
unlimited
Deprecated.- UserateLimited(UserAgent, String, String)instead.Returns a client which will send unlimited requests.- Parameters:
agent- - The user agent to useurl- - The URL to useapiKey- - 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) Deprecated.- UserateLimited(UserAgent, String, String, long)instead.Returns a client which will send unlimited requests.- Parameters:
agent- - The user agent to useurl- - The URL to useapiKey- - The API key to usetimeout- - The timeout to use in milliseconds- Returns:
- - A client which will send unlimited requests.
-
rateLimited
Returns a client which will send requests and adjust speed based on rate limits- Parameters:
agent- - The user agent to useapiKey- - The API key to use- Returns:
- - A client which will send requests and adjust speed based on rate
-
rateLimited
Returns a client which will send requests and adjust speed based on rate limits- Parameters:
agent- - The user agent to useurl- - The base URL to useapiKey- - The API key to use- Returns:
- - A client which will send requests and adjust speed based on rate
-
rateLimited
Returns a client which will send requests and adjust speed based on rate limits- Parameters:
agent- - The user agent to useurl- - The base URL to useapiKey- - The API key to usetimeout- - The timeout to use in milliseconds- Returns:
- - A client which will send requests and adjust speed based on rate
-
search
public CompletableFuture<SearchEndpoint.SearchResponse> search(SearchEndpoint.SearchRequest request) Executes a search request.- Parameters:
request- - The request to execute- Returns:
- - A future which will return the response
-
projects
Returns the project endpoints.- Returns:
- - The project endpoints
-
versions
Returns the version endpoints.- Returns:
- - The version endpoints
-
users
Returns the user endpoints.- Returns:
- - The user endpoints
-
teams
Returns the team endpoints.- Returns:
- - The team endpoints
-
tags
Returns the tag endpoints.- Returns:
- - The tag endpoints
-
rateLimited(UserAgent, String)instead.