novuhq / novu-kotlin

Kotlin SDK for Novu - The open-source notification infrastructure for engineers. 🚀
MIT License
19 stars 8 forks source link
gradle hacktoberfest kotlin novu novu-api
Logo

Novu Kotlin SDK

License GitHub release (with filter)

The Novu Kotlin SDK provides a fluent and expressive interface for interacting with Novu's API and managing notifications. Please refer to the full documentation to learn more.

Installation

Maven users:

<!--add dependency-->
<dependency>
    <groupId>co.novu</groupId>
    <artifactId>novu-kotlin</artifactId>
    <version>1.2.0</version>
</dependency>

Gradle users:

//Kotlin
//add dependency
implementation("co.novu:novu-kotlin:1.2.0")
//Groovy
//add dependency
implementation 'co.novu:novu-kotlin:1.2.0'

Sync your project, and you should have the artifacts downloaded.

Usage

To use the library, first initialize the client with your API token:

// without changing the backend URL
import co.novu.Novu
import co.novu.extensions.environments

fun main() {
    val novu = Novu(apiKey = "API_KEY")
    val environment = novu.environments()
    println(environment)
}
// with config param
import co.novu.Novu
import co.novu.NovuConfig
import co.novu.extensions.environments

fun main() {
    val config = NovuConfig(backendUrl = "URL", apiKey = "API_KEY")
    val novu = Novu(config)
    val environment = novu.environments()
    println(environment)
} 

You can then call methods on the client to interact with the Novu API:

novu.subscribers()

List of all methods

The client methods map directly to the Novu API endpoints. Here is a list of all the available methods. Check the API docs for list of available methods.

Changes

Environments

Events

Execution Details

Feeds

Inbound Parse

Integrations

Layouts

Messages

Notification Groups

Notification Templates

Notification

Subscribers

Topics

Blueprints

Tenants

Organizations

Workflow Override

For more information about these methods and their parameters, see the API documentation.

Contributing

Feature requests, bug reports and pull requests are welcome. Please create an issue.

Support and Feedback

Be sure to visit the Novu official documentation website for additional information about our API. If you need additional assistance, join our Discord server here.

License

Novu Kotlin SDK is licensed under the MIT License - see the LICENSE file for details.

Contributors

Contributors