@@ -13,6 +13,8 @@ enum HomeAPI {
1313 case getPreCertification
1414 case deletePreCertification( id: Int )
1515 case getFavoriteCertification
16+ case getMonthlyPreCertification( year: Int , month: Int )
17+ case getDailyPreCertification( date: String )
1618 case addPreCertification( request: AddPreCertificationRequestDTO )
1719 case editPreCertification( request: EditPreCertificationRequestDTO , id: Int )
1820}
@@ -33,6 +35,10 @@ extension HomeAPI: BaseTargetType {
3335 return " home/pre-certification/ \( id) "
3436 case . getFavoriteCertification:
3537 return " home/favorite "
38+ case . getMonthlyPreCertification:
39+ return " home/pre-certification/month "
40+ case . getDailyPreCertification:
41+ return " home/pre-certification/day "
3642 case . addPreCertification:
3743 return " home/pre-certification "
3844 case . editPreCertification( _, id: let id) :
@@ -50,6 +56,10 @@ extension HomeAPI: BaseTargetType {
5056 return . get
5157 case . addPreCertification:
5258 return . post
59+ case . getMonthlyPreCertification:
60+ return . get
61+ case . getDailyPreCertification:
62+ return . get
5363 case . editPreCertification:
5464 return . patch
5565 }
@@ -63,6 +73,18 @@ extension HomeAPI: BaseTargetType {
6373 return . requestPlain
6474 case . getFavoriteCertification:
6575 return . requestPlain
76+ case . getMonthlyPreCertification( let year, let month) :
77+ return . requestParameters(
78+ parameters: [
79+ " year " : " \( year) " ,
80+ " month " : " \( month) " ] ,
81+ encoding: URLEncoding . queryString
82+ )
83+ case . getDailyPreCertification( let date) :
84+ return . requestParameters(
85+ parameters: [ " date " : " \( date) " ] ,
86+ encoding: URLEncoding . queryString
87+ )
6688 case . addPreCertification( let request) :
6789 return . requestJSONEncodable( request)
6890 case . editPreCertification( let request, _) :
0 commit comments