Skip to content

casibase/casibase-java-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

casibase-java-sdk

GitHub Actions codebeat badge codecov Javadocs Maven Central Release Discord

This is the Java SDK for Casibase, which allows you to easily call Casibase's API.

The Casibase SDK is very easy to use. We will demonstrate the usage steps below.

Step 1: Initialize Configuration

Initialization requires 5 parameters, all of which are strings:

Name (in order) Required Description
endpoint Yes Casibase server URL, e.g., https://demo-admin.casibase.com
clientId Yes Client ID
clientSecret Yes Client secret
organizationName Yes Name of the Casibase organization, e.g., casbin
applicationName No Name of the Casibase application, e.g., app-casibase

Step 2: Obtain and Use Services

Currently, the available service is: TaskService

You can create it like this:

TaskService taskService = new TaskService(config);

TaskService

TaskService supports basic task operations, such as:

  • getTask(String name): Get a single task by task name.
  • getTasks(): Get all tasks under the organizationName.
  • addTask(Task task)/updateTask(Task task)/deleteTask(Task task): Write to the database.