com.exaroton.api.request.server.ServerRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api Show documentation
Show all versions of api Show documentation
The official exaroton java library
package com.exaroton.api.request.server;
import com.exaroton.api.APIRequest;
import com.exaroton.api.ExarotonClient;
import java.util.HashMap;
public abstract class ServerRequest extends APIRequest {
private final String serverId;
public ServerRequest(ExarotonClient client, String serverId) {
super(client);
if (serverId == null || serverId.length() == 0) throw new IllegalArgumentException("Invalid server id!");
this.serverId = serverId;
}
@Override
protected HashMap getData() {
HashMap map = super.getData();
map.put("id", this.serverId);
return map;
}
}