mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-30 03:51:05 +00:00
28 lines
542 B
Swift
28 lines
542 B
Swift
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||
|
|
||
|
import Foundation
|
||
|
|
||
|
enum AccountEndpoint {
|
||
|
case verifyCredentials
|
||
|
}
|
||
|
|
||
|
extension AccountEndpoint: MastodonEndpoint {
|
||
|
typealias ResultType = Account
|
||
|
|
||
|
var context: [String] {
|
||
|
defaultContext + ["accounts"]
|
||
|
}
|
||
|
|
||
|
var pathComponentsInContext: [String] {
|
||
|
switch self {
|
||
|
case .verifyCredentials: return ["verify_credentials"]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
var method: HTTPMethod {
|
||
|
switch self {
|
||
|
case .verifyCredentials: return .get
|
||
|
}
|
||
|
}
|
||
|
}
|