metatext/Mastodon/Sources/Mastodon/Networking/Mastodon API/Endpoints/AccountEndpoint.swift

28 lines
569 B
Swift
Raw Normal View History

// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
2020-08-30 23:33:11 +00:00
public enum AccountEndpoint {
case verifyCredentials
}
2020-08-30 23:59:49 +00:00
extension AccountEndpoint: Endpoint {
2020-08-30 23:33:11 +00:00
public typealias ResultType = Account
2020-08-30 23:33:11 +00:00
public var context: [String] {
defaultContext + ["accounts"]
}
2020-08-30 23:33:11 +00:00
public var pathComponentsInContext: [String] {
switch self {
case .verifyCredentials: return ["verify_credentials"]
}
}
2020-08-30 23:33:11 +00:00
public var method: HTTPMethod {
switch self {
case .verifyCredentials: return .get
}
}
}