-
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.
✨ feature/discover api mocking (#20)
* ✨ Messages API & Model 상상코딩 * ✨ 누락된 부분 추가구현
- Loading branch information
Showing
7 changed files
with
373 additions
and
305 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
19 changes: 0 additions & 19 deletions
19
Dear-World/Dear-World/Source/Domain/Message/API/List.swift
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
Dear-World/Dear-World/Source/Domain/Message/API/Message.API.Messages.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,32 @@ | ||
// | ||
// List.swift | ||
// Dear-World | ||
// | ||
// Created by rookie.w on 2020/12/27. | ||
// | ||
|
||
import Alamofire | ||
import Foundation | ||
|
||
extension Message.API { | ||
struct Messages: ServiceAPI { | ||
typealias Response = Message.Model.Messages | ||
|
||
// MARK: Parameters | ||
private let countryId: Int | ||
private let lastMsgId: Int | ||
|
||
var method: HTTPMethod { .get } | ||
var path: String { "/api/v1/messages" } | ||
var parameters: [String : Any]? { | ||
["countryId": countryId, | ||
"lastId": lastMsgId] | ||
} | ||
|
||
init(countryId: Int, lastMsgId: Int) { | ||
self.countryId = countryId | ||
self.lastMsgId = lastMsgId | ||
} | ||
} | ||
} | ||
|
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
Oops, something went wrong.