import 'package:forestvpn_api/api.dart';
All URIs are relative to https://api.forestvpn.com/v2
Method | HTTP request | Description |
---|---|---|
getNotification | GET /news/notifications/{notificationID}/ | Get notification content |
getNotificationsUnreadCount | GET /news/unread_count/ | Get unread notifications count |
listNotifications | GET /news/notifications/ | Get notifications list |
updateNotificationMarkRead | PATCH /news/notifications/{notificationID}/mark_read/ | Mark notification as read by user |
updateNotificationMarkReadAll | PATCH /news/notifications/mark_read_all/ | Mark all notifications as read by user |
NotificationDetail getNotification(notificationID)
Get notification content
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getNewsApi();
final int notificationID = 56; // int |
try {
final response = api.getNotification(notificationID);
print(response);
} catch on DioError (e) {
print('Exception when calling NewsApi->getNotification: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
notificationID | int |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NotificationUnreadCount getNotificationsUnreadCount()
Get unread notifications count
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getNewsApi();
try {
final response = api.getNotificationsUnreadCount();
print(response);
} catch on DioError (e) {
print('Exception when calling NewsApi->getNotificationsUnreadCount: $e\n');
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BuiltList listNotifications(isPublished)
Get notifications list
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getNewsApi();
final bool isPublished = true; // bool |
try {
final response = api.listNotifications(isPublished);
print(response);
} catch on DioError (e) {
print('Exception when calling NewsApi->listNotifications: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
isPublished | bool | [optional] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateNotificationMarkRead(notificationID)
Mark notification as read by user
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getNewsApi();
final int notificationID = 56; // int |
try {
api.updateNotificationMarkRead(notificationID);
} catch on DioError (e) {
print('Exception when calling NewsApi->updateNotificationMarkRead: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
notificationID | int |
void (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()
Mark all notifications as read by user
import 'package:forestvpn_api/api.dart';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
final api = ForestvpnApi().getNewsApi();
try {
api.updateNotificationMarkReadAll();
} catch on DioError (e) {
print('Exception when calling NewsApi->updateNotificationMarkReadAll: $e\n');
}
This endpoint does not need any parameter.
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]