mirror of
https://bitbucket.org/myhomie/myhomie_app.git
synced 2025-12-06 00:51:19 +00:00
3.2 KiB
3.2 KiB
mycore_api.api.NotificationApi
Load the API package
import 'package:mycore_api/api.dart';
All URIs are relative to https://localhost:5001
| Method | HTTP request | Description |
|---|---|---|
| notificationCreateSimpleNotification | POST /Notification/all | Create a fcm notification |
| notificationCreateSimpleNotificationForSpecificUser | POST /Notification/home/{homeId} | Create a fcm notification for a specific home |
notificationCreateSimpleNotification
bool notificationCreateSimpleNotification(notificationDTO)
Create a fcm notification
Example
import 'package:mycore_api/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = NotificationApi();
final notificationDTO = NotificationDTO(); // NotificationDTO | notificationDTO
try {
final result = api_instance.notificationCreateSimpleNotification(notificationDTO);
print(result);
} catch (e) {
print('Exception when calling NotificationApi->notificationCreateSimpleNotification: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notificationDTO | NotificationDTO | notificationDTO |
Return type
bool
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]
notificationCreateSimpleNotificationForSpecificUser
bool notificationCreateSimpleNotificationForSpecificUser(homeId, notificationDTO)
Create a fcm notification for a specific home
Example
import 'package:mycore_api/api.dart';
// TODO Configure OAuth2 access token for authorization: bearer
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = NotificationApi();
final homeId = homeId_example; // String | homeId
final notificationDTO = NotificationDTO(); // NotificationDTO | notificationDTO
try {
final result = api_instance.notificationCreateSimpleNotificationForSpecificUser(homeId, notificationDTO);
print(result);
} catch (e) {
print('Exception when calling NotificationApi->notificationCreateSimpleNotificationForSpecificUser: $e\n');
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| homeId | String | homeId | |
| notificationDTO | NotificationDTO | notificationDTO |
Return type
bool
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]