2020-02-18 21:43:30 +00:00
|
|
|
//
|
|
|
|
// UserApi.swift
|
2022-08-07 13:31:15 +01:00
|
|
|
// Mixonomer
|
2020-02-18 21:43:30 +00:00
|
|
|
//
|
|
|
|
// Created by Andy Pack on 18/02/2020.
|
|
|
|
// Copyright © 2020 Sarsoo. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
import Alamofire
|
|
|
|
import SwiftyJSON
|
|
|
|
|
|
|
|
public enum UserApi {
|
|
|
|
case getUser
|
|
|
|
}
|
|
|
|
|
|
|
|
extension UserApi: ApiRequest {
|
|
|
|
var domain: String {
|
|
|
|
return ApiRequestDefaults.domain
|
|
|
|
}
|
|
|
|
|
|
|
|
var path: String {
|
|
|
|
switch self {
|
|
|
|
case .getUser:
|
|
|
|
return "api/user"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var httpMethod: Alamofire.HTTPMethod {
|
|
|
|
switch self {
|
|
|
|
case .getUser:
|
|
|
|
return .get
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var parameters: JSON? {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
var parameterType: ParameterEncoder? {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
var headers: HTTPHeaders? {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
var authMethod: AuthMethod? {
|
|
|
|
return ApiRequestDefaults.authMethod
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|