com.lukaspradel.steamapi.webapi.request.GetPlayerSummariesRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of steam-web-api Show documentation
Show all versions of steam-web-api Show documentation
A library to provide access to the data available from Valve's Steam API
package com.lukaspradel.steamapi.webapi.request;
import java.util.List;
import com.lukaspradel.steamapi.webapi.core.SteamWebApiInterface;
import com.lukaspradel.steamapi.webapi.core.SteamWebApiInterfaceMethod;
import com.lukaspradel.steamapi.webapi.core.SteamWebApiVersion;
import com.lukaspradel.steamapi.webapi.request.builders.AbstractSteamWebApiRequestBuilder;
/**
* Steam Web API Request GetPlayerSummaries
*
* @see https://developer.valvesoftware.com/wiki/Steam_Web_API#GetPlayerSummaries_.28v0002.29
* @author lpradel
*
*/
public class GetPlayerSummariesRequest extends SteamWebApiRequest {
private GetPlayerSummariesRequest(SteamWebApiRequestBuilder builder) {
super(builder);
}
/**
* Builder object to create instances of {@link SteamWebApiRequest} for
* request type {@link GetPlayerSummariesRequest}.
*
* @author lpradel
*
*/
public static class GetPlayerSummariesRequestBuilder extends
AbstractSteamWebApiRequestBuilder {
private final List steamIds;
public static final String REQUEST_PARAM_STEAM_IDS = "steamids";
public GetPlayerSummariesRequestBuilder(List steamIds) {
if (steamIds.isEmpty()) {
throw new IllegalArgumentException(
"You must supply at least 1 Steam ID!");
}
this.steamIds = steamIds;
}
@Override
protected SteamWebApiInterface getInterface() {
return SteamWebApiInterface.I_STEAM_USER;
}
@Override
protected SteamWebApiInterfaceMethod getInterfaceMethod() {
return SteamWebApiInterfaceMethod.GET_PLAYER_SUMMARIES;
}
@Override
protected SteamWebApiVersion getVersion() {
return SteamWebApiVersion.VERSION_TWO;
}
@Override
public GetPlayerSummariesRequest buildRequest() {
addListParameter(REQUEST_PARAM_STEAM_IDS, steamIds);
return new GetPlayerSummariesRequest(this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy