feat: 重构 Reminder Notification 系统并更新应用包名
This commit is contained in:
@@ -17,6 +17,14 @@ class InboxApi {
|
||||
final response = await _client.patch('$_prefix/$messageId/read');
|
||||
return InboxMessageResponse.fromJson(response.data);
|
||||
}
|
||||
|
||||
Future<Stream<String>> streamEvents({String? lastEventId}) {
|
||||
final headers = <String, String>{'Accept': 'text/event-stream'};
|
||||
if (lastEventId != null && lastEventId.isNotEmpty) {
|
||||
headers['Last-Event-ID'] = lastEventId;
|
||||
}
|
||||
return _client.getSseLines('$_prefix/stream', headers: headers);
|
||||
}
|
||||
}
|
||||
|
||||
class InboxMessageResponse {
|
||||
|
||||
Reference in New Issue
Block a user