notification.dart 690 B

1234567891011121314151617181920212223242526272829303132
  1. import 'dart:core';
  2. import 'package:fis_jsonrpc/client_base.dart';
  3. import 'notification.m.dart';
  4. class NotificationService extends JsonRpcClientBase {
  5. NotificationService(
  6. String host, {
  7. String serviceName = "INotificationService",
  8. Map<String, String>? headers,
  9. int? timeout,
  10. }) : super(
  11. host,
  12. serviceName,
  13. headers: headers,
  14. timeout: timeout,
  15. );
  16. Future<bool> sendMessageAsync(SendNotificationRequest request) async {
  17. var rpcRst = await call("SendMessageAsync", request);
  18. return rpcRst;
  19. }
  20. Future<bool> postMessageAsync(SendNotificationRequest request) async {
  21. var rpcRst = await call("PostMessageAsync", request);
  22. return rpcRst;
  23. }
  24. }