14 KiB
openapi.api.NotificationsApi
Load the API package
import 'package:openapi/api.dart';
All URIs are relative to /api
| Method | HTTP request | Description |
|---|---|---|
| deleteNotification | DELETE /notifications/{id} | Delete a notification |
| deleteNotifications | DELETE /notifications | Delete notifications |
| getNotification | GET /notifications/{id} | Get a notification |
| getNotifications | GET /notifications | Retrieve notifications |
| updateNotification | PUT /notifications/{id} | Update a notification |
| updateNotifications | PUT /notifications | Update notifications |
deleteNotification
deleteNotification(id)
Delete a notification
Delete a specific notification.
Example
import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = NotificationsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
try {
api_instance.deleteNotification(id);
} catch (e) {
print('Exception when calling NotificationsApi->deleteNotification: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteNotifications
deleteNotifications(notificationDeleteAllDto)
Delete notifications
Delete a list of notifications at once.
Example
import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = NotificationsApi();
final notificationDeleteAllDto = NotificationDeleteAllDto(); // NotificationDeleteAllDto |
try {
api_instance.deleteNotifications(notificationDeleteAllDto);
} catch (e) {
print('Exception when calling NotificationsApi->deleteNotifications: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notificationDeleteAllDto | NotificationDeleteAllDto |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getNotification
NotificationDto getNotification(id)
Get a notification
Retrieve a specific notification identified by id.
Example
import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = NotificationsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
try {
final result = api_instance.getNotification(id);
print(result);
} catch (e) {
print('Exception when calling NotificationsApi->getNotification: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getNotifications
List getNotifications(id, level, type, unread)
Retrieve notifications
Retrieve a list of notifications.
Example
import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = NotificationsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String | Filter by notification ID
final level = ; // NotificationLevel |
final type = ; // NotificationType |
final unread = true; // bool | Filter by unread status
try {
final result = api_instance.getNotifications(id, level, type, unread);
print(result);
} catch (e) {
print('Exception when calling NotificationsApi->getNotifications: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | Filter by notification ID | [optional] |
| level | NotificationLevel | [optional] | |
| type | NotificationType | [optional] | |
| unread | bool | Filter by unread status | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateNotification
NotificationDto updateNotification(id, notificationUpdateDto)
Update a notification
Update a specific notification to set its read status.
Example
import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = NotificationsApi();
final id = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // String |
final notificationUpdateDto = NotificationUpdateDto(); // NotificationUpdateDto |
try {
final result = api_instance.updateNotification(id, notificationUpdateDto);
print(result);
} catch (e) {
print('Exception when calling NotificationsApi->updateNotification: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | ||
| notificationUpdateDto | NotificationUpdateDto |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateNotifications
updateNotifications(notificationUpdateAllDto)
Update notifications
Update a list of notifications. Allows to bulk-set the read status of notifications.
Example
import 'package:openapi/api.dart';
// TODO Configure API key authorization: cookie
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookie').apiKeyPrefix = 'Bearer';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = NotificationsApi();
final notificationUpdateAllDto = NotificationUpdateAllDto(); // NotificationUpdateAllDto |
try {
api_instance.updateNotifications(notificationUpdateAllDto);
} catch (e) {
print('Exception when calling NotificationsApi->updateNotifications: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notificationUpdateAllDto | NotificationUpdateAllDto |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]