Slide 9
Slide 9 text
API$Λ࣮͢Δଆͷίʔυ$(2)
extension HogeApi.Endpoint {
class Login: Request {
let user: String
let pass: String
var URLRequest: NSURLRequest? {
return HogeApi.URLRequest(method: .GET, path: "login",
parameters: ["user": user, "pass": pass])
}
typealias Response = LoginResponse
static func responseFromObject(object: AnyObject) -> Response? {
return LoginResponse(object)
}
...
}