Java SDK
Last updated · Changelog · OpenAPI spec · Markdown
Our official Java SDK provides enterprise-grade reliability and performance for Java applications.
Installation
Maven:
<dependency>
<groupId>com.shopsavvy</groupId>
<artifactId>shopsavvy-sdk</artifactId>
<version>1.1.0</version>
</dependency>Gradle:
implementation 'com.shopsavvy:shopsavvy-sdk:1.1.0'Quick Start
import com.shopsavvy.ShopSavvyClient;
import com.shopsavvy.model.Product;
import com.shopsavvy.model.ApiResponse;
public class Example {
public static void main(String[] args) {
// Create a new client
ShopSavvyClient client = new ShopSavvyClient("ss_live_your_api_key_here");
try {
// Get product details
ApiResponse<Product> response = client.getProductDetails("012345678901");
Product product = response.getData();
System.out.println("Product: " + product.getName());
System.out.println("Brand: " + product.getBrand());
// Get current offers
var offers = client.getCurrentOffers("012345678901");
offers.getData().forEach(offer -> {
System.out.printf("%s: $%.2f%n",
offer.getRetailer(), offer.getPrice());
});
} catch (Exception e) {
System.err.println("Error: " + e.getMessage());
}
}
}Features
- Full Java type safety with generics
- Builder pattern for configuration
- Async support with CompletableFuture
- Spring Boot auto-configuration
- Jackson JSON serialization
- Comprehensive error handling
Was this page helpful?