mirror of
https://github.com/metabolist/metatext.git
synced 2024-05-13 22:12:54 +00:00
31 lines
555 B
Swift
31 lines
555 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
import HTTP
|
|
|
|
public enum FiltersEndpoint {
|
|
case filters
|
|
}
|
|
|
|
extension FiltersEndpoint: Endpoint {
|
|
public typealias ResultType = [Filter]
|
|
|
|
public var context: [String] {
|
|
defaultContext + ["filters"]
|
|
}
|
|
|
|
public var pathComponentsInContext: [String] {
|
|
switch self {
|
|
case .filters:
|
|
return []
|
|
}
|
|
}
|
|
|
|
public var method: HTTPMethod {
|
|
switch self {
|
|
case .filters:
|
|
return .get
|
|
}
|
|
}
|
|
}
|