Interface IBricksetService
-
- All Known Implementing Classes:
BricksetServiceImpl
public interface IBricksetServiceBrickset web services.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancheckKey()Check if an API key is valid.booleancheckUserHash(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<Instruction>getInstructions2(String setNumber)Get a list of instructions for the specified set without the need to look up the set ID first.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.Stringlogin(String username, String password)Log in as a user and retrieve a token that can be used in subsequent API calls.voidsetCollection(int setId, SetCollectionParameters params, String userHash)Set a user's collection details.voidsetMinifigCollection(String minifigNumber, SetMinifigCollectionParameters params, String userHash)Add/change a user's 'loose' minifig collection.
-
-
-
Method Detail
-
checkKey
boolean checkKey() throws BricksetExceptionCheck if an API key is valid.- Returns:
- true if key is valid
- Throws:
BricksetException- if status is not success
-
login
String login(String username, String password) throws BricksetException
Log in as a user and retrieve a token that can be used in subsequent API calls.- Parameters:
username- A Brickset usernamepassword- A Brickset password- Returns:
- the user hash
- Throws:
BricksetException- if status is not success
-
checkUserHash
boolean checkUserHash(String userHash) throws BricksetException
Check if a userHash key is valid.- Parameters:
userHash- User hash retrieved by the login method- Returns:
- true if userHash is valid
- Throws:
BricksetException- if status is not success
-
getKeyUsageStats
List<ApiKeyUsage> getKeyUsageStats() throws BricksetException
Get key usage stats for the last 30 days. Note that only calls to the getSets method count against key usage.- Returns:
- key usage stats
- Throws:
BricksetException- if status is not success
-
getSets
List<Set> getSets(SetParameters params) throws BricksetException
Retrieve a list of sets, or more information about a particular one.- Parameters:
params- parameters- Returns:
- a list of sets
- Throws:
BricksetException- if status is not success
-
getSets
List<Set> getSets(SetParameters params, String userHash) throws BricksetException
Retrieve a list of sets, or more information about a particular one.- Parameters:
params- parametersuserHash- userHash, only if user data needed- Returns:
- a list of sets
- Throws:
BricksetException- if status is not success
-
getAdditionalImages
List<AdditionalImages> getAdditionalImages(int setId) throws BricksetException
Get a list of URLs of additional set images for the specified set.- Parameters:
setId- Set ID- Returns:
- a list of additional images
- Throws:
BricksetException- if status is not success
-
getInstructions
List<Instruction> getInstructions(int setId) throws BricksetException
Get a list of instructions for the specified set.- Parameters:
setId- Set ID- Returns:
- a list of instructions
- Throws:
BricksetException- if status is not success
-
getInstructions2
List<Instruction> getInstructions2(String setNumber) throws BricksetException
Get a list of instructions for the specified set without the need to look up the set ID first.- Parameters:
setNumber- Set number- Returns:
- a list of instructions
- Throws:
BricksetException- if status is not success
-
getReviews
List<Reviews> getReviews(int setId) throws BricksetException
Get user reviews for the specified set.- Parameters:
setId- a set id.- Returns:
- a list of reviews
- Throws:
BricksetException- if status is not success
-
getThemes
List<Theme> getThemes() throws BricksetException
Get a list of themes, with the total number of sets in each.- Returns:
- the list of themes
- Throws:
BricksetException- if status is not success
-
getSubthemes
List<Subtheme> getSubthemes(String theme) throws BricksetException
Get a list of subthemes for a given theme, with the total number of sets in each.- Parameters:
theme- a theme- Returns:
- a list of subthemes
- Throws:
BricksetException- if status is not success
-
getYears
List<Year> getYears(String theme) throws BricksetException
Get a list of years for a given theme, with the total number of sets in each.- Parameters:
theme- theme- Returns:
- a list of years
- Throws:
BricksetException- if status is not success
-
setCollection
void setCollection(int setId, SetCollectionParameters params, String userHash) throws BricksetExceptionSet a user's collection details.- Parameters:
setId- Set ID.params- parametersuserHash- user hash- Throws:
BricksetException- if status is not success
-
getUserNotes
List<UserNotes> getUserNotes(String userHash) throws BricksetException
Get all of a user's set notes.- Parameters:
userHash- user hash- Returns:
- a list of user's notes
- Throws:
BricksetException- if status is not success
-
getUserMinifigNotes
List<UserMinifigNotes> getUserMinifigNotes(String userHash) throws BricksetException
Get all of a user's minifigure notes.- Parameters:
userHash- userhash- Returns:
- a list of all user's notes
- Throws:
BricksetException- if status is not success
-
getMinifigCollection
List<MinifigCollection> getMinifigCollection(GetMinifigCollectionParameters params, String userHash) throws BricksetException
Get a list of minifigs owned/wanted by a user.- Parameters:
params- parametersuserHash- user hash- Returns:
- a list of minifigs
- Throws:
BricksetException- if status is not success
-
setMinifigCollection
void setMinifigCollection(String minifigNumber, SetMinifigCollectionParameters params, String userHash) throws BricksetException
Add/change a user's 'loose' minifig collection.- Parameters:
minifigNumber- minifig numberparams- parametersuserHash- user hash- Throws:
BricksetException- if status is not success
-
-