mirror of
https://github.com/metabolist/metatext.git
synced 2025-01-24 11:48:07 +00:00
25 lines
479 B
Swift
25 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 }
|
||
|
}
|