Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement storefront request type appdetails
- Loading branch information
Showing
5 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
src/main/java/com/lukaspradel/steamapi/storefrontapi/request/AppdetailsRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package com.lukaspradel.steamapi.storefrontapi.request; | ||
|
||
import com.lukaspradel.steamapi.storefrontapi.core.SteamStorefrontApiMethod; | ||
import com.lukaspradel.steamapi.storefrontapi.request.builders.AbstractSteamStorefrontApiRequestBuilder; | ||
|
||
/** | ||
* Steam Web API Request appdetails | ||
* | ||
* @see <a href= | ||
* "https://wiki.teamfortress.com/wiki/User:RJackson/StorefrontAPI#appdetails" | ||
* >https://wiki.teamfortress.com/wiki/User:RJackson/StorefrontAPI#appdetails</a> | ||
* @author lpradel | ||
* | ||
*/ | ||
public class AppdetailsRequest extends SteamStorefrontApiRequest { | ||
|
||
private AppdetailsRequest(SteamStorefrontApiRequestBuilder builder) { | ||
super(builder); | ||
} | ||
|
||
/** | ||
* Builder object to create instances of {@link SteamStorefrontApiRequest} | ||
* for request type {@link AppdetailsRequest}. | ||
* | ||
* @author lpradel | ||
* | ||
*/ | ||
public static class AppdetailsRequestBuilder extends | ||
AbstractSteamStorefrontApiRequestBuilder { | ||
|
||
private final Integer appIds; | ||
|
||
public static final String REQUEST_PARAM_APP_IDS = "appids"; | ||
|
||
public AppdetailsRequestBuilder(Integer appIds) { | ||
|
||
this.appIds = appIds; | ||
} | ||
|
||
@Override | ||
protected SteamStorefrontApiMethod getMethod() { | ||
|
||
return SteamStorefrontApiMethod.APP_DETAILS; | ||
}; | ||
|
||
@Override | ||
public AppdetailsRequest buildRequest() { | ||
|
||
addParameter(REQUEST_PARAM_APP_IDS, appIds); | ||
|
||
return new AppdetailsRequest(this); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/test/resources/com/lukaspradel/steamapi/storefrontapi/client/Appdetails.json
Large diffs are not rendered by default.
Oops, something went wrong.