
nl.pvanassen.steam.community.friends.SteamFriendService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of steam-api Show documentation
Show all versions of steam-api Show documentation
A Java API to access the Steam community market through the HTTP interface. This may be against the TOS so be careful using it!
package nl.pvanassen.steam.community.friends;
import nl.pvanassen.steam.http.Http;
import nl.pvanassen.steam.http.NullHandle;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Friends service to handle friend requests
*
* @author Paul van Assen
*/
public class SteamFriendService implements FriendService {
private final Logger logger = LoggerFactory.getLogger(getClass());
private final Http http;
private final String username;
/**
* @param http For mocking
* @param username The username
*/
public SteamFriendService(Http http, String username) {
this.http = http;
this.username = username;
}
@Override
public void ignoreAllFriendRequests() {
logger.info("Ignoring all friends");
http.get("http://steamcommunity.com/id/" + username + "/home_process?action=ignoreAll&type=friends&sessionID=" + http.getSessionId(), new NullHandle(), false, false);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy