mirror of
https://github.com/metabolist/metatext.git
synced 2024-05-16 23:43:01 +00:00
30 lines
597 B
Swift
30 lines
597 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
import HTTP
|
|
import Mastodon
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|