Class SetsServiceImpl
- java.lang.Object
-
- org.dajlab.bricksetapi.v3.service.AbstractBricksetService
-
- org.dajlab.bricksetapi.v3.service.impl.SetsServiceImpl
-
public class SetsServiceImpl extends AbstractBricksetService
Implementation of the sets methods.
-
-
Constructor Summary
Constructors Constructor Description SetsServiceImpl(String apiKey)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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<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<Year>getYears(String theme)Get a list of years for a given theme, with the total number of sets in each.-
Methods inherited from class org.dajlab.bricksetapi.v3.service.AbstractBricksetService
returnJsonResponse, returnJsonResponse
-
-
-
-
Constructor Detail
-
SetsServiceImpl
public SetsServiceImpl(String apiKey)
Constructor.- Parameters:
apiKey- api key
-
-
Method Detail
-
getSets
public List<Set> getSets(SetParameters params) throws BricksetException
Retrieve a list of sets, or more information about a particular one.- Parameters:
params- query paratemers- Returns:
- a list of sets
- Throws:
BricksetException- if status is not success
-
getSets
public List<Set> getSets(SetParameters params, String userHash) throws BricksetException
Retrieve a list of sets, or more information about a particular one.- Parameters:
params- query paratemersuserHash- userhash- Returns:
- a list of sets
- Throws:
BricksetException- if status is not success
-
getAdditionalImages
public List<AdditionalImages> getAdditionalImages(int setId) throws BricksetException
Get a list of URLs of additional set images for the specified set.- Parameters:
setId- the set id.- Returns:
- a list of additional images
- Throws:
BricksetException- if status is not success
-
getInstructions
public List<Instruction> getInstructions(int setId) throws BricksetException
Get a list of instructions for the specified set.- Parameters:
setId- a set id.- Returns:
- a list of instructions
- Throws:
BricksetException- if status is not success
-
getReviews
public 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
public List<Theme> getThemes() throws BricksetException
Get a list of themes, with the total number of sets in each.- Returns:
- the list of the themes
- Throws:
BricksetException- if status is not success
-
getSubthemes
public 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
public 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. An empty string get totals for all sets.- Returns:
- a list of years
- Throws:
BricksetException- if status is not success
-
-