metatext/Shared/Networking/Mastodon API/Endpoints/ContextEndpoint.swift
Justin Mazzocchi 7863866f68
Status contexts
2020-08-19 15:16:03 -07:00

24 lines
479 B
Swift

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