metatext/MastodonAPI/Sources/MastodonAPI/Endpoints/AccountEndpoint.swift

30 lines
597 B
Swift
Raw Normal View History

// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
2020-08-31 01:40:58 +00:00
import HTTP
import Mastodon
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
}
}
}