Skip to content

Commit

Permalink
Added kotlin Get notifications, Get notification statistics, Get noti…
Browse files Browse the repository at this point in the history
…fication example (novuhq#268)
  • Loading branch information
biplobsd committed Oct 18, 2023
1 parent 63df2b7 commit e03ba86
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 3 deletions.
17 changes: 16 additions & 1 deletion api-reference/notification/get-notification-statistics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,19 @@
openapi: get /v1/notifications/stats
---

<Snippet file="apikey-warning.mdx" />
<Snippet file="apikey-warning.mdx" />

<RequestExample>

```kotlin Kotlin
import co.novu.Novu
import co.novu.extensions.notificationsStats

fun main() {
val novu = Novu(apiKey = "<NOVU_API_KEY>")
val notificationsStats = novu.notificationsStats()
println(notificationsStats)
}
```

</RequestExample>
17 changes: 16 additions & 1 deletion api-reference/notification/get-notification.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,19 @@
openapi: get /v1/notifications/{notificationId}
---

<Snippet file="apikey-warning.mdx" />
<Snippet file="apikey-warning.mdx" />

<RequestExample>

```kotlin Kotlin
import co.novu.Novu
import co.novu.extensions.notification

fun main() {
val novu = Novu(apiKey = "<NOVU_API_KEY>")
val notification = novu.notification("<NOTIFICATION_ID>")
println(notification)
}
```

</RequestExample>
19 changes: 18 additions & 1 deletion api-reference/notification/get-notifications.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,21 @@
openapi: get /v1/notifications
---

<Snippet file="apikey-warning.mdx" />
<Snippet file="apikey-warning.mdx" />

<RequestExample>

```kotlin Kotlin
import co.novu.Novu
import co.novu.dto.request.NotificationRequest
import co.novu.extensions.notifications

fun main() {
val novu = Novu(apiKey = "<NOVU_API_KEY>")
val notificationRequest = NotificationRequest("<CHANNELS>", "<TEMPLATES>", "<EMAILS>", "<SEARCH>");
val notifications = novu.notifications(notificationRequest)
println(notifications)
}
```

</RequestExample>

0 comments on commit e03ba86

Please sign in to comment.