Installation
- Java
- Node.js
The Java SDK's root package is com.notificationhub.sdk. Add it to your project using your build tool of choice, pointing at wherever your organization publishes the artifact (internal Maven repository, GitHub Packages, or Maven Central, depending on your setup).
Maven
<dependency>
<groupId>io.github.sumitshresht</groupId>
<artifactId>notificationhub-java-sdk</artifactId>
<version>REPLACE_WITH_LATEST_VERSION</version>
</dependency>
Gradle (Kotlin DSL)
dependencies {
implementation("io.github.sumitshresht:notificationhub-java-sdk:REPLACE_WITH_LATEST_VERSION")
}
Requirements
- Java 11+ (the SDK uses
java.net.http.HttpClient, introduced in Java 11) - Jackson (
jackson-databind,jackson-datatype-jsr310) on the classpath for JSON (de)serialization
Spring Boot
If you're on Spring Boot, see Spring Boot Auto-Configuration — the SDK ships a NotificationHubAutoConfiguration that wires up a NotificationHubClient bean from application.yml.
The Node.js SDK is written in TypeScript and ships full type definitions.
npm install @sumitshresht/notificationhub-sdk
Requirements
- Node.js 18+ (the SDK's
BaseApiClientuses the globalfetchAPI) - TypeScript 4.5+ if you want compile-time types for
NotificationRequest,ChannelType,ProjectStatus, and the response interfaces
Next step
Continue to the Quickstart to send your first notification.