metatext/Shared/Networking/Mastodon API/AccountEndpoint.swift
2020-07-31 00:13:54 -07:00

29 lines
559 B
Swift

// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Alamofire
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
}
}
}