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

25 lines
452 B
Swift

// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import Alamofire
enum InstanceEndpoint {
case instance
}
extension InstanceEndpoint: MastodonEndpoint {
typealias ResultType = Instance
var pathComponentsInContext: [String] {
switch self {
case .instance: return ["instance"]
}
}
var method: HTTPMethod {
switch self {
case .instance: return .get
}
}
}