mirror of
https://github.com/metabolist/metatext.git
synced 2024-05-14 14:32:56 +00:00
29 lines
581 B
Swift
29 lines
581 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
import HTTP
|
|
|
|
public enum AccountEndpoint {
|
|
case verifyCredentials
|
|
}
|
|
|
|
extension AccountEndpoint: Endpoint {
|
|
public typealias ResultType = Account
|
|
|
|
public var context: [String] {
|
|
defaultContext + ["accounts"]
|
|
}
|
|
|
|
public var pathComponentsInContext: [String] {
|
|
switch self {
|
|
case .verifyCredentials: return ["verify_credentials"]
|
|
}
|
|
}
|
|
|
|
public var method: HTTPMethod {
|
|
switch self {
|
|
case .verifyCredentials: return .get
|
|
}
|
|
}
|
|
}
|