Class GeneralServiceImpl

    • Constructor Detail

      • GeneralServiceImpl

        public GeneralServiceImpl​(String apiKey)
        Constructor.
        Parameters:
        apiKey - api key
    • Method Detail

      • login

        public 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 - Brickset username
        password - password
        Returns:
        the userHash
        Throws:
        BricksetException - if log in failed
      • checkUserHash

        public boolean checkUserHash​(String userHash)
                              throws BricksetException
        Check if a userHash key is valid.
        Parameters:
        userHash - a userHash
        Returns:
        true if valid
        Throws:
        BricksetException - if userhash is invalid
      • getKeyUsageStats

        public 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