This repository has been archived by the owner on Nov 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
140 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
ShowPot/ShowPot/Domain/UseCase/MyAlarmList/DefaultMyAlarmListUseCase.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// DefaultMyAlarmListUseCase.swift | ||
// ShowPot | ||
// | ||
// Created by 이건준 on 9/24/24. | ||
// | ||
|
||
import Foundation | ||
|
||
import RxSwift | ||
import RxCocoa | ||
|
||
final class DefaultMyAlarmListUseCase: MyAlarmListUseCase { | ||
|
||
private let apiService: SPShowAPI | ||
private let disposeBag = DisposeBag() | ||
|
||
var myAlarmModel: RxRelay.BehaviorRelay<[MyAlarmInfo]> = BehaviorRelay<[MyAlarmInfo]>(value: []) | ||
|
||
init(apiService: SPShowAPI = SPShowAPI()) { | ||
self.apiService = apiService | ||
requestMyAlarmModel() | ||
} | ||
|
||
func requestMyAlarmModel() { | ||
myAlarmModel.accept([ | ||
.init(thumbnailImageURL: URL(string: "https://ticketimage.interpark.com/Play/image/large/24/24006288_p.gif"), mainAlarm: "티켓팅이 1시간 남았어요!", subAlarm: "1시간 후, 0000 티켓팅이 오픈됩니다.🥰", timeLeft: "1분전"), | ||
.init(thumbnailImageURL: URL(string: "https://ticketimage.interpark.com/Play/image/large/24/24006714_p.gif"), mainAlarm: "티켓팅이 6시간 남았어요!", subAlarm: "6시간 후, 0000 예매가 오픈됩니다.🥰", timeLeft: "5시간 전"), | ||
.init(thumbnailImageURL: URL(string: "https://ticketimage.interpark.com/Play/image/large/24/24011642_p.gif"), mainAlarm: "구독장르의 공연이 오픈 되었어요!", subAlarm: "EDM 장르의 공연이 업데이트 되었어요.", timeLeft: "10분전"), | ||
.init(thumbnailImageURL: URL(string: "https://ticketimage.interpark.com/Play/image/large/24/24007623_p.gif"), mainAlarm: "구독한 아티스트 공연이 오픈 되었어요!", subAlarm: "힙합 장르의 공연이 업데이트 되었어요.", timeLeft: "2시간 전"), | ||
.init(thumbnailImageURL: URL(string: "https://media.bunjang.co.kr/product/262127257_1_1714651082_w360.jpg"), mainAlarm: "티켓팅이 24시간 남았어요!", subAlarm: "High Flying Birds 의 공연이 업데이트 되었어요.", timeLeft: "8분전"), | ||
]) | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
ShowPot/ShowPot/Domain/UseCase/MyAlarmList/MyAlarmListUseCase.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// MyAlarmListUseCase.swift | ||
// ShowPot | ||
// | ||
// Created by 이건준 on 9/24/24. | ||
// | ||
|
||
import RxSwift | ||
import RxCocoa | ||
|
||
protocol MyAlarmListUseCase { | ||
var myAlarmModel: BehaviorRelay<[MyAlarmInfo]> { get } | ||
func requestMyAlarmModel() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters