Mixonomer-iOS/Mixonomer/Network/AdminApi.swift

54 lines
852 B
Swift
Raw Normal View History

2022-08-14 13:14:21 +01:00
//
// AdminApi.swift
// Mixonomer
//
// Created by Andy Pack on 13/08/2022.
// Copyright © 2022 Sarsoo. All rights reserved.
//
import Foundation
import Alamofire
import SwiftyJSON
public enum AdminApi {
case getUsers
}
extension AdminApi: ApiRequest {
var domain: String {
return ApiRequestDefaults.domain
}
var path: String {
switch self {
case .getUsers:
return "api/users"
}
}
var httpMethod: HTTPMethod {
switch self {
case .getUsers:
return .get
}
}
var parameters: JSON? {
nil
}
var parameterType: ParameterEncoder? {
nil
}
var headers: HTTPHeaders? {
nil
}
var authMethod: AuthMethod? {
return ApiRequestDefaults.authMethod
}
}