feat(news,calendar): improve corporate calendar filters and news sentiment dialogs
This commit is contained in:
@@ -53,6 +53,19 @@ class NewsRepository {
|
||||
}
|
||||
}
|
||||
|
||||
Future<NewsArticleModel> reanalyzeArticle(String articleId) async {
|
||||
try {
|
||||
final response = await apiClient.post('/api/v1/news/sentiment/article/$articleId/analyze');
|
||||
if (response.statusCode == 200 && response.data != null) {
|
||||
final Map<String, dynamic> data = response.data is Map ? Map<String, dynamic>.from(response.data) : {};
|
||||
return NewsArticleModel.fromJson(data);
|
||||
}
|
||||
throw Exception('Unerwartete Server-Antwort');
|
||||
} catch (e) {
|
||||
throw Exception('Sentiment-Analyse fehlgeschlagen: $e');
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> connectToLiveFeed() async {
|
||||
if (_hubConnection != null && _hubConnection!.state == HubConnectionState.connected) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user