metatext/Mastodon/Sources/Mastodon/API/Endpoints/FiltersEndpoint.swift

31 lines
555 B
Swift
Raw Normal View History

2020-08-29 10:26:26 +00:00
// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
2020-08-31 01:40:58 +00:00
import HTTP
2020-08-29 10:26:26 +00:00
2020-08-30 23:33:11 +00:00
public enum FiltersEndpoint {
2020-08-29 10:26:26 +00:00
case filters
}
2020-08-30 23:59:49 +00:00
extension FiltersEndpoint: Endpoint {
2020-08-30 23:33:11 +00:00
public typealias ResultType = [Filter]
2020-08-29 10:26:26 +00:00
2020-08-30 23:33:11 +00:00
public var context: [String] {
2020-08-29 10:26:26 +00:00
defaultContext + ["filters"]
}
2020-08-30 23:33:11 +00:00
public var pathComponentsInContext: [String] {
2020-08-29 10:26:26 +00:00
switch self {
case .filters:
return []
}
}
2020-08-30 23:33:11 +00:00
public var method: HTTPMethod {
2020-08-29 10:26:26 +00:00
switch self {
case .filters:
return .get
}
}
}