All URIs are relative to https://api.forestvpn.com/v2
Method | HTTP request | Description |
---|---|---|
GetNotificationsUnreadCount | Get /notifications/unread_count/ | Get unread notifications count |
ListNotifications | Get /notifications/all_list/ | Get notifications list |
UpdateNotificationMarkRead | Get /notifications/mark_as_read/{slug}/ | Mark notification as read by user |
UpdateNotificationMarkReadAll | Get /notifications/mark_all_as_read/ | Mark all notifications as read by user |
NotificationUnreadCount GetNotificationsUnreadCount(ctx).Execute()
Get unread notifications count
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NotificationsApi.GetNotificationsUnreadCount(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NotificationsApi.GetNotificationsUnreadCount``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetNotificationsUnreadCount`: NotificationUnreadCount
fmt.Fprintf(os.Stdout, "Response from `NotificationsApi.GetNotificationsUnreadCount`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetNotificationsUnreadCountRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]NotificationAllList ListNotifications(ctx).Limit(limit).Offset(offset).Type_(type_).Execute()
Get notifications list
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
limit := int32(56) // int32 | (optional)
offset := int32(56) // int32 | (optional)
type_ := "type__example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NotificationsApi.ListNotifications(context.Background()).Limit(limit).Offset(offset).Type_(type_).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NotificationsApi.ListNotifications``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListNotifications`: []NotificationAllList
fmt.Fprintf(os.Stdout, "Response from `NotificationsApi.ListNotifications`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListNotificationsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
limit | int32 | ||
offset | int32 | ||
type_ | string |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateNotificationMarkRead(ctx, slug).Execute()
Mark notification as read by user
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
slug := int32(56) // int32 |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NotificationsApi.UpdateNotificationMarkRead(context.Background(), slug).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NotificationsApi.UpdateNotificationMarkRead``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
slug | int32 |
Other parameters are passed through a pointer to a apiUpdateNotificationMarkReadRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateNotificationMarkReadAll(ctx).Execute()
Mark all notifications as read by user
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NotificationsApi.UpdateNotificationMarkReadAll(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NotificationsApi.UpdateNotificationMarkReadAll``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiUpdateNotificationMarkReadAllRequest struct via the builder pattern
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]