Skip to main content

TestSdk Java SDK 1.0.1

Welcome to the TestSdk SDK documentation. This guide will help you get started with integrating and using the TestSdk SDK in your project.

This SDK was generated by liblab

Versions

  • API version: v1
  • SDK version: 1.0.1

About the API

The public Abbey API. Used for integrating with Abbey and building interfaces to extend the Abbey platform. See https://docs.abbey.io for more information.

Table of Contents

Setup & Configuration

Supported Language Versions

This SDK is compatible with the following versions: Java >= 1.8

Installation

If you use Maven, place the following within the dependency tag in your pom.xml file:

<dependency>
<groupId>com.swagger</groupId>
<artifactId>petstore</artifactId>
<version>1.0.1</version>
</dependency>

If you use Gradle, paste the next line inside the dependencies block of your build.gradle file:

implementation group: com.swagger, name: petstore, version: 1.0.1

If you use JAR files, package the SDK by running the following command:

mvn compile assembly:single

Then, add the JAR file to your project's classpath.

Authentication

Access Token Authentication

The TestSdk API uses an Access Token for authentication.

This token must be provided to authenticate your requests to the API.

Setting the Access Token

When you initialize the SDK, you can set the access token as follows:

import com.swagger.petstore.TestSdk;
import com.swagger.petstore.config.TestSdkConfig;

public class Main {
public static void main(String[] args) {
TestSdkConfig config = TestSdkConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();

TestSdk testSdk = new TestSdk(config);
}
}

If you need to set or update the access token after initializing the SDK, you can use:

testSdk.setAccessToken('YOUR_ACCESS_TOKEN');

Setting a Custom Timeout

You can set a custom timeout for the SDK's HTTP requests as follows:

import com.swagger.petstore.TestSdk;
import com.swagger.petstore.config.TestSdkConfig;

public class Main {
public static void main(String[] args) {
TestSdkConfig config = TestSdkConfig.builder().timeout(10000).build();
TestSdk testSdk = new TestSdk(config);
}
}

Sample Usage

Below is a comprehensive example demonstrating how to authenticate and call a simple endpoint:

import com.swagger.petstore.TestSdk;
import com.swagger.petstore.config.TestSdkConfig;
import com.swagger.petstore.exceptions.ApiException;
import com.swagger.petstore.models.GrantKit;
import java.util.List;

public class Main {
public static void main(String[] args) {
TestSdkConfig config = TestSdkConfig.builder()
.accessToken("YOUR_ACCESS_TOKEN")
.build();

TestSdk testSdk = new TestSdk(config);


try {
List<GrantKit> response = testSdk.grantKits.listGrantKits();

System.out.println(response);
} catch (ApiException e) {
e.printStackTrace();
}

System.exit(0);
}
}

Services

The SDK provides various services to interact with the API.

Below is a list of all available services with links to their detailed documentation:
Name
GrantKitsService: [Java] [Kotlin]
IdentitiesService: [Java] [Kotlin]
RequestsService: [Java] [Kotlin]
ReviewsService: [Java] [Kotlin]
GrantsService: [Java] [Kotlin]
SamlConnectionsService: [Java] [Kotlin]
DemoService: [Java] [Kotlin]
SlackCommandService: [Java] [Kotlin]

Models

The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.

Below is a list of all available models with links to their detailed documentation:

License

This SDK is licensed under the MIT License.

See the LICENSE file for more details.