metatext-app-ios-iphone-ipad/MastodonAPI/Sources/MastodonAPI/Endpoints/InstanceEndpoint.swift

26 lines
483 B
Swift
Raw Normal View History

// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
2020-08-31 03:40:58 +02:00
import HTTP
import Mastodon
2020-08-31 01:33:11 +02:00
public enum InstanceEndpoint {
case instance
}
2020-08-31 01:59:49 +02:00
extension InstanceEndpoint: Endpoint {
2020-08-31 01:33:11 +02:00
public typealias ResultType = Instance
2020-08-31 01:33:11 +02:00
public var pathComponentsInContext: [String] {
switch self {
case .instance: return ["instance"]
}
}
2020-08-31 01:33:11 +02:00
public var method: HTTPMethod {
switch self {
case .instance: return .get
}
}
}