public abstract class SteamMethod extends Object
The steam API is divided into interfaces, methods and versions. - This class represents the abstract idea of the Steam Method.
| Constructor and Description |
|---|
SteamMethod(SteamInterface steamInterface,
String name,
List<SteamMethodVersion> versions)
A constructor to create a SteamMethod.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute(SteamHTTPMethod method,
SteamHost host,
SteamVersion version,
SteamVisibility visibility,
Input input,
SteamResponse callback,
boolean async)
Executes the method with the provided parameters.
|
Optional<SteamMethodVersion> |
get(SteamHTTPMethod method,
SteamHost host,
SteamVersion version,
SteamVisibility visibility)
Gives the
SteamMethodVersion belonging to the provided configuration of host and version. |
SteamInterface |
getInterface()
Gives the related
SteamInterface. |
String |
getName()
Gives the name of the method which can be directly used in URLs to access the API.
|
Set<SteamHost> |
getSupportedHosts()
Gives a set of all supported
hosts. |
Set<SteamHTTPMethod> |
getSupportedMethods()
Gives a set of all supported
hosts. |
Set<SteamVersion> |
getSupportedVersions()
Gives a set of all supported
versions. |
Set<SteamVisibility> |
getSupportedVisibilities()
Gives a set of all supported
visibilities. |
List<SteamMethodVersion> |
getVersions()
Gives a list of all supported
method versions. |
boolean |
supports(SteamHost host)
Checks if the method supports the host.
|
boolean |
supports(SteamHTTPMethod method)
Checks if the method supports the HTTP request method.
|
boolean |
supports(SteamVersion version)
Checks if the method supports the version.
|
boolean |
supports(SteamVisibility visibility)
Checks if the method supports the visibility.
|
public SteamMethod(SteamInterface steamInterface, String name, List<SteamMethodVersion> versions)
A constructor to create a SteamMethod.
steamInterface - The SteamInterface the method belongs to.name - The name of the method which can be directly used in URLs to access the API.versions - A list with all various method versions the method supports.public String getName()
Gives the name of the method which can be directly used in URLs to access the API.
public SteamInterface getInterface()
Gives the related SteamInterface.
public Set<SteamHTTPMethod> getSupportedMethods()
Gives a set of all supported hosts.
public Set<SteamHost> getSupportedHosts()
Gives a set of all supported hosts.
public Set<SteamVersion> getSupportedVersions()
Gives a set of all supported versions.
public Set<SteamVisibility> getSupportedVisibilities()
Gives a set of all supported visibilities.
public List<SteamMethodVersion> getVersions()
Gives a list of all supported method versions.
public Optional<SteamMethodVersion> get(SteamHTTPMethod method, SteamHost host, SteamVersion version, SteamVisibility visibility)
Gives the SteamMethodVersion belonging to the provided configuration of host and version.
method - The HTTP request of the method.host - The SteamHost the method can access.version - The version of the Steam method.visibility - The visibility of the method.public boolean supports(SteamHTTPMethod method)
Checks if the method supports the HTTP request method.
method - The HTTP request method to check.public boolean supports(SteamHost host)
Checks if the method supports the host.
host - The host to check.public boolean supports(SteamVersion version)
Checks if the method supports the version.
version - The version to check.public boolean supports(SteamVisibility visibility)
Checks if the method supports the visibility.
visibility - The visibility to check.public void execute(SteamHTTPMethod method, SteamHost host, SteamVersion version, SteamVisibility visibility, Input input, SteamResponse callback, boolean async)
Executes the method with the provided parameters.
method - The HTTP request method.host - The host used to perform the request.version - The version of the method.visibility - The visibility of the method.input - The required input.callback - The callback to onResponse when done.async - True, if the API should run an async onResponse, otherwise false.Copyright © 2017. All rights reserved.