Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Kotlin Get notifications, Get notification statistics, Get notification Examples for Notification API in API Reference Documentation #269

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions api-reference/notification/get-notification-statistics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ openapi: get /v1/notifications/stats

<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)
}
```

```bash cURL
curl --request GET \
--url https://api.novu.co/v1/notifications/stats \
Expand All @@ -22,4 +33,5 @@ notificationApi = NotificationApi(url, api_key)

notification_stats = notificationApi.stats()
```

</RequestExample>
12 changes: 12 additions & 0 deletions api-reference/notification/get-notification.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ openapi: get /v1/notifications/{notificationId}

<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)
}
```

```bash cURL
curl --request GET \
--url https://api.novu.co/v1/notifications/{notificationId} \
Expand All @@ -23,4 +34,5 @@ notificationApi = NotificationApi(url, api_key)
notification = notificationApi.get("<notificationId>")
print(notification)
```

</RequestExample>
14 changes: 14 additions & 0 deletions api-reference/notification/get-notifications.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ openapi: get /v1/notifications

<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)
}
```

```bash cURL
curl --request GET \
--url https://api.novu.co/v1/notifications \
Expand All @@ -22,4 +35,5 @@ notificationApi = NotificationApi(url, api_key)

notifications = notificationApi.list()
```

</RequestExample>