public class BricksetServiceImpl extends Object implements IBricksetService
| Constructor and Description |
|---|
BricksetServiceImpl(String apiKey)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkKey()
Check if an API key is valid.
|
boolean |
checkUserHash(String userHash)
Check if a userHash key is valid.
|
List<AdditionalImages> |
getAdditionalImages(int setId)
Get a list of URLs of additional set images for the specified set.
|
List<Instruction> |
getInstructions(int setId)
Get a list of instructions for the specified set.
|
List<ApiKeyUsage> |
getKeyUsageStats()
Get key usage stats for the last 30 days.
|
List<MinifigCollection> |
getMinifigCollection(GetMinifigCollectionParameters params,
String userHash)
Get a list of minifigs owned/wanted by a user.
|
List<Reviews> |
getReviews(int setId)
Get user reviews for the specified set.
|
List<Set> |
getSets(SetParameters params)
Retrieve a list of sets, or more information about a particular one.
|
List<Set> |
getSets(SetParameters params,
String userHash)
Retrieve a list of sets, or more information about a particular one.
|
List<Subtheme> |
getSubthemes(String theme)
Get a list of subthemes for a given theme, with the total number of sets in
each.
|
List<Theme> |
getThemes()
Get a list of themes, with the total number of sets in each.
|
List<UserMinifigNotes> |
getUserMinifigNotes(String userHash)
Get all of a user's minifigure notes.
|
List<UserNotes> |
getUserNotes(String userHash)
Get all of a user's set notes.
|
List<Year> |
getYears(String theme)
Get a list of years for a given theme, with the total number of sets in each.
|
String |
login(String username,
String password)
Log in as a user and retrieve a token that can be used in subsequent API
calls.
|
void |
setCollection(int setId,
SetCollectionParameters params,
String userHash)
Set a user's collection details.
|
void |
setMinifigCollection(String minifigNumber,
SetMinifigCollectionParameters params,
String userHash)
Add/change a user's 'loose' minifig collection.
|
public BricksetServiceImpl(String apiKey)
apiKey - api keypublic boolean checkKey()
throws BricksetException
checkKey in interface IBricksetServiceBricksetException - if status is not successpublic String login(String username, String password) throws BricksetException
login in interface IBricksetServiceusername - A Brickset usernamepassword - A Brickset passwordBricksetException - if status is not successpublic boolean checkUserHash(String userHash) throws BricksetException
checkUserHash in interface IBricksetServiceuserHash - User hash retrieved by the login methodBricksetException - if status is not successpublic List<ApiKeyUsage> getKeyUsageStats() throws BricksetException
getKeyUsageStats in interface IBricksetServiceBricksetException - if status is not successpublic List<Set> getSets(SetParameters params) throws BricksetException
getSets in interface IBricksetServiceparams - parametersBricksetException - if status is not successpublic List<Set> getSets(SetParameters params, String userHash) throws BricksetException
getSets in interface IBricksetServiceparams - parametersuserHash - userHash, only if user data neededBricksetException - if status is not successpublic List<AdditionalImages> getAdditionalImages(int setId) throws BricksetException
getAdditionalImages in interface IBricksetServicesetId - Set IDBricksetException - if status is not successpublic List<Instruction> getInstructions(int setId) throws BricksetException
getInstructions in interface IBricksetServicesetId - Set IDBricksetException - if status is not successpublic List<Reviews> getReviews(int setId) throws BricksetException
getReviews in interface IBricksetServicesetId - a set id.BricksetException - if status is not successpublic List<Theme> getThemes() throws BricksetException
getThemes in interface IBricksetServiceBricksetException - if status is not successpublic List<Subtheme> getSubthemes(String theme) throws BricksetException
getSubthemes in interface IBricksetServicetheme - a themeBricksetException - if status is not successpublic List<Year> getYears(String theme) throws BricksetException
getYears in interface IBricksetServicetheme - themeBricksetException - if status is not successpublic void setCollection(int setId,
SetCollectionParameters params,
String userHash)
throws BricksetException
setCollection in interface IBricksetServicesetId - Set ID.params - parametersuserHash - user hashBricksetException - if status is not successpublic List<UserNotes> getUserNotes(String userHash) throws BricksetException
getUserNotes in interface IBricksetServiceuserHash - user hashBricksetException - if status is not successpublic List<UserMinifigNotes> getUserMinifigNotes(String userHash) throws BricksetException
getUserMinifigNotes in interface IBricksetServiceuserHash - userhashBricksetException - if status is not successpublic List<MinifigCollection> getMinifigCollection(GetMinifigCollectionParameters params, String userHash) throws BricksetException
getMinifigCollection in interface IBricksetServiceparams - parametersuserHash - user hashBricksetException - if status is not successpublic void setMinifigCollection(String minifigNumber, SetMinifigCollectionParameters params, String userHash) throws BricksetException
setMinifigCollection in interface IBricksetServiceminifigNumber - minifig numberparams - parametersuserHash - user hashBricksetException - if status is not successCopyright © 2020. All rights reserved.