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

25 lines
514 B
Swift

// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
public enum ContextEndpoint {
case context(id: String)
}
extension ContextEndpoint: MastodonEndpoint {
public typealias ResultType = MastodonContext
public var context: [String] {
defaultContext + ["statuses"]
}
public var pathComponentsInContext: [String] {
switch self {
case let .context(id):
return [id, "context"]
}
}
public var method: HTTPMethod { .get }
}