mirror of
https://github.com/metabolist/metatext.git
synced 2024-05-15 15:02:55 +00:00
30 lines
551 B
Swift
30 lines
551 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
public enum FiltersEndpoint {
|
|
case filters
|
|
}
|
|
|
|
extension FiltersEndpoint: MastodonEndpoint {
|
|
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
|
|
}
|
|
}
|
|
}
|