metatext-app-ios-iphone-ipad/Mastodon/Sources/Mastodon/Networking/Mastodon API/Endpoints/AccountEndpoint.swift

28 lines
577 B
Swift
Raw Normal View History

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