Class AbstractBricksetService
- java.lang.Object
-
- org.dajlab.bricksetapi.v3.service.AbstractBricksetService
-
- Direct Known Subclasses:
GeneralServiceImpl,MinifigCollectionManagementServiceImpl,SetCollectionManagementServiceImpl,SetsServiceImpl
public abstract class AbstractBricksetService extends Object
Abstract service.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractBricksetService(String apiKey)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringreturnJsonResponse(Method method, String uri)Call the service and return the response.protected StringreturnJsonResponse(Method method, String uri, Map<String,String> parameters, String userHash)Call the service and return the response.
-
-
-
Constructor Detail
-
AbstractBricksetService
protected AbstractBricksetService(String apiKey)
Constructor.- Parameters:
apiKey- your Rebrickable private key.
-
-
Method Detail
-
returnJsonResponse
protected String returnJsonResponse(Method method, String uri) throws BricksetException
Call the service and return the response.- Parameters:
method- http methodeuri- uri- Returns:
- the string representation of the JSON response
- Throws:
BricksetException- if status is not success
-
returnJsonResponse
protected String returnJsonResponse(Method method, String uri, Map<String,String> parameters, String userHash) throws BricksetException
Call the service and return the response.- Parameters:
method- http methodeuri- uriparameters- request parametersuserHash- user hash- Returns:
- the string representation of the JSON response
- Throws:
BricksetException- if status is not success
-
-