Skip to content

Commit

Permalink
preferences fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tatarco committed Feb 4, 2025
1 parent 8345043 commit 24dec45
Show file tree
Hide file tree
Showing 6 changed files with 2,498 additions and 0 deletions.
126 changes: 126 additions & 0 deletions docs/sdks/novunotifications/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# NovuNotifications
(*Subscribers.Notifications*)

## Overview

### Available Operations

* [Feed](#feed) - Get in-app notification feed for a particular subscriber
* [UnseenCount](#unseencount) - Get the unseen in-app notifications count for subscribers feed

## Feed

Get in-app notification feed for a particular subscriber

### Example Usage

```go
package main

import(
"context"
"os"
novugo "github.com/novuhq/novu-go"
"github.com/novuhq/novu-go/models/operations"
"log"
)

func main() {
ctx := context.Background()

s := novugo.New(
novugo.WithSecurity(os.Getenv("NOVU_SECRET_KEY")),
)

res, err := s.Subscribers.Notifications.Feed(ctx, operations.SubscribersV1ControllerGetNotificationsFeedRequest{
SubscriberID: "<id>",
Payload: novugo.String("btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30="),
})
if err != nil {
log.Fatal(err)
}
if res.FeedResponseDto != nil {
// handle response
}
}
```

### Parameters

| Parameter | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
| `request` | [operations.SubscribersV1ControllerGetNotificationsFeedRequest](../../models/operations/subscribersv1controllergetnotificationsfeedrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |

### Response

**[*operations.SubscribersV1ControllerGetNotificationsFeedResponse](../../models/operations/subscribersv1controllergetnotificationsfeedresponse.md), error**

### Errors

| Error Type | Status Code | Content Type |
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
| apierrors.ErrorDto | 414 | application/json |
| apierrors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| apierrors.ValidationErrorDto | 422 | application/json |
| apierrors.ErrorDto | 500 | application/json |
| apierrors.APIError | 4XX, 5XX | \*/\* |

## UnseenCount

Get the unseen in-app notifications count for subscribers feed

### Example Usage

```go
package main

import(
"context"
"os"
novugo "github.com/novuhq/novu-go"
"log"
)

func main() {
ctx := context.Background()

s := novugo.New(
novugo.WithSecurity(os.Getenv("NOVU_SECRET_KEY")),
)

res, err := s.Subscribers.Notifications.UnseenCount(ctx, "<id>", nil, nil, nil)
if err != nil {
log.Fatal(err)
}
if res.UnseenCountResponse != nil {
// handle response
}
}
```

### Parameters

| Parameter | Type | Required | Description |
| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- |
| `ctx` | [context.Context](https://pkg.go.dev/context#Context) | :heavy_check_mark: | The context to use for the request. |
| `subscriberID` | *string* | :heavy_check_mark: | N/A |
| `seen` | **bool* | :heavy_minus_sign: | Indicates whether to count seen notifications. |
| `limit` | **float64* | :heavy_minus_sign: | The maximum number of notifications to return. |
| `idempotencyKey` | **string* | :heavy_minus_sign: | A header for idempotency purposes |
| `opts` | [][operations.Option](../../models/operations/option.md) | :heavy_minus_sign: | The options for this request. |

### Response

**[*operations.SubscribersV1ControllerGetUnseenCountResponse](../../models/operations/subscribersv1controllergetunseencountresponse.md), error**

### Errors

| Error Type | Status Code | Content Type |
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
| apierrors.ErrorDto | 414 | application/json |
| apierrors.ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json |
| apierrors.ValidationErrorDto | 422 | application/json |
| apierrors.ErrorDto | 500 | application/json |
| apierrors.APIError | 4XX, 5XX | \*/\* |
Loading

0 comments on commit 24dec45

Please sign in to comment.