mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-27 02:21:07 +00:00
23 lines
435 B
Swift
23 lines
435 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|