public class GeneralServiceImpl extends AbstractBricksetService
| Constructor and Description |
|---|
GeneralServiceImpl(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<ApiKeyUsage> |
getKeyUsageStats()
Get key usage stats for the last 30 days.
|
String |
login(String username,
String password)
Log in as a user and retrieve a token that can be used in subsequent API
calls.
|
returnJsonResponse, returnJsonResponsepublic GeneralServiceImpl(String apiKey)
apiKey - api keypublic boolean checkKey()
throws BricksetException
BricksetException - if the key is incorrectpublic String login(String username, String password) throws BricksetException
username - Brickset usernamepassword - passwordBricksetException - if log in failedpublic boolean checkUserHash(String userHash) throws BricksetException
userHash - a userHashBricksetException - if userhash is invalidpublic List<ApiKeyUsage> getKeyUsageStats() throws BricksetException
BricksetException - if status is not successCopyright © 2022. All rights reserved.