Java Library for Candor Services' Project Mercury API.
You can add the library to your project with Maven:
Repo:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>Dependency:
<dependency>
<groupId>com.github.candorservices</groupId>
<artifactId>candor-java</artifactId>
<version>1.0</version>
</dependency>You can then get started by initializing a new instance of the Candor clas using your public API key found at https://dashboard.candorservices.net/api-dashboard.
You can verify if a license is valid using this method:
boolean valid = candor.verifyLicense("LICDENSE_KEY_HERE", "PRODUCT_ID_HERE");You'll want to grab your product ID from https://dashboard.candorservices.net/license-manager by creating a new product and then adding a license. The license key should be added by the client, using some sort of config (we recommend remote configs, see below!). Assign your license to your client using the tools in the dashboard.
Remote configs allow clients to easily configure parts of their apps without having to mess with complicated or messy configuration files. You can use this function:
Config config = candor.getConfig("CONFIG_ID_HERE");to retrieve the remote config. You can then run actions on retrieving values in that config:
String licenseKey = config.getString("license");You can also retrieve nested values like this:
String licenseKey = config.getString("license.key");using a dot (.) to split objects, similar to how YAML in Spigot works.
To retrieve objects nested inside of an array, you can use:
String colors = config.getString("colors.0.name");with 0 being the index of the object you want to retrieve.
There are also tons of other cool methods in that class that could be helpful.
You can create a remote config at https://dashboard.candorservices.net/config-manager.
If you need help with anything to do with this project, then please see the project-mercury-support channel in Discord under the FREELANCERS category.