mirror of
https://github.com/metabolist/metatext.git
synced 2024-12-02 04:50:59 +00:00
24 lines
479 B
Swift
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 }
|
|
}
|