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 appuserdetails
- Loading branch information
Showing
10 changed files
with
273 additions
and
17 deletions.
There are no files selected for viewing
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
61 changes: 61 additions & 0 deletions
61
src/main/java/com/lukaspradel/steamapi/storefrontapi/request/AppUserdetailsRequest.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,61 @@ | ||
package com.lukaspradel.steamapi.storefrontapi.request; | ||
|
||
import java.util.List; | ||
|
||
import com.lukaspradel.steamapi.storefrontapi.core.SteamStorefrontApiMethod; | ||
import com.lukaspradel.steamapi.storefrontapi.request.builders.AbstractSteamStorefrontApiRequestBuilder; | ||
|
||
/** | ||
* Steam Web API Request appuserdetails | ||
* | ||
* @see <a href= | ||
* "https://wiki.teamfortress.com/wiki/User:RJackson/StorefrontAPI#appuserdetails" | ||
* >https://wiki.teamfortress.com/wiki/User:RJackson/StorefrontAPI#appuserdetails</a> | ||
* @author lpradel | ||
* | ||
*/ | ||
public class AppUserdetailsRequest extends SteamStorefrontApiRequest { | ||
|
||
private AppUserdetailsRequest(SteamStorefrontApiRequestBuilder builder) { | ||
super(builder); | ||
} | ||
|
||
/** | ||
* Builder object to create instances of {@link SteamStorefrontApiRequest} | ||
* for request type {@link AppUserdetailsRequest}. | ||
* | ||
* @author lpradel | ||
* | ||
*/ | ||
public static class AppUserdetailsRequestBuilder extends | ||
AbstractSteamStorefrontApiRequestBuilder { | ||
|
||
private final List<Integer> appIds; | ||
|
||
public static final String REQUEST_PARAM_APP_IDS = "appids"; | ||
|
||
public AppUserdetailsRequestBuilder(List<Integer> appIds) { | ||
|
||
if (appIds.isEmpty()) { | ||
throw new IllegalArgumentException( | ||
"You must supply at least 1 App ID!"); | ||
} | ||
|
||
this.appIds = appIds; | ||
} | ||
|
||
@Override | ||
protected SteamStorefrontApiMethod getMethod() { | ||
|
||
return SteamStorefrontApiMethod.APP_USER_DETAILS; | ||
}; | ||
|
||
@Override | ||
public AppUserdetailsRequest buildRequest() { | ||
|
||
addListParameter(REQUEST_PARAM_APP_IDS, appIds); | ||
|
||
return new AppUserdetailsRequest(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
110 changes: 110 additions & 0 deletions
110
...s/com/lukaspradel/steamapi/schema/storefrontapi/appuserdetails/appuserdetails.schema.json
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,110 @@ | ||
{ | ||
"type":"object", | ||
"required":false, | ||
"javaType":"com.lukaspradel.steamapi.data.json.appuserdetails.AppUserdetails", | ||
"additionalProperties":{ | ||
"type":"object", | ||
"required":false, | ||
"javaType":"com.lukaspradel.steamapi.data.json.appuserdetails.AppUserdetail", | ||
"properties":{ | ||
"data":{ | ||
"type":"object", | ||
"required":false, | ||
"properties":{ | ||
"added_to_wishlist":{ | ||
"type":"boolean", | ||
"required":false | ||
}, | ||
"friendsown":{ | ||
"type":"array", | ||
"required":false, | ||
"items":{ | ||
"type":"object", | ||
"required":false, | ||
"properties":{ | ||
"playtime_total":{ | ||
"type":"integer", | ||
"required":false | ||
}, | ||
"playtime_twoweeks":{ | ||
"type":"integer", | ||
"required":false | ||
}, | ||
"steamid":{ | ||
"type":"string", | ||
"required":false | ||
} | ||
} | ||
} | ||
}, | ||
"friendswant":{ | ||
"type":"array", | ||
"required":false, | ||
"items":{ | ||
"type":"object", | ||
"required":false, | ||
"properties":{ | ||
"playtime_total":{ | ||
"type":"integer", | ||
"required":false | ||
}, | ||
"playtime_twoweeks":{ | ||
"type":"integer", | ||
"required":false | ||
}, | ||
"steamid":{ | ||
"type":"string", | ||
"required":false | ||
} | ||
} | ||
} | ||
}, | ||
"is_owned":{ | ||
"type":"boolean", | ||
"required":false | ||
}, | ||
"recommendations":{ | ||
"type":"object", | ||
"required":false, | ||
"properties":{ | ||
"friends":{ | ||
"type":"array", | ||
"required":false, | ||
"items":{ | ||
"type":"object", | ||
"required":false, | ||
"properties":{ | ||
"commentcount":{ | ||
"type":"integer", | ||
"required":false | ||
}, | ||
"recommendation":{ | ||
"type":"string", | ||
"required":false | ||
}, | ||
"steamid":{ | ||
"type":"string", | ||
"required":false | ||
}, | ||
"timestamp":{ | ||
"type":"integer", | ||
"required":false | ||
} | ||
} | ||
} | ||
}, | ||
"totalfriends":{ | ||
"type":"integer", | ||
"required":false | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"success":{ | ||
"type":"boolean", | ||
"required":false | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.