We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a96f53 commit ac55dc5Copy full SHA for ac55dc5
Projects/Data/Sources/DataSource/Remote/RemoteNotificationsDataSource.swift
@@ -0,0 +1,21 @@
1
+import RxSwift
2
+import RxCocoa
3
+import Domain
4
+
5
+public protocol RemoteNotificationsDataSource {
6
+ func fetchNotificationList() -> Single<[NotificationEntity]>
7
+ func patchReadNotification(id: Int) -> Completable
8
+}
9
10
+final class RemoteNotificationsDataSourceImpl: RemoteBaseDataSource<NotificationsAPI>, RemoteNotificationsDataSource {
11
+ public func fetchNotificationList() -> Single<[NotificationEntity]> {
12
+ request(.fetchNotificationList)
13
+ .map(NotificationListResponseDTO.self)
14
+ .map { $0.toDomain() }
15
+ }
16
17
+ public func patchReadNotification(id: Int) -> Completable {
18
+ request(.patchReadNotification(id: id))
19
+ .asCompletable()
20
21
0 commit comments