2020-08-07 01:41:59 +00:00
|
|
|
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
|
|
|
|
import Foundation
|
2020-08-31 01:40:58 +00:00
|
|
|
import HTTP
|
2020-09-04 01:55:46 +00:00
|
|
|
import Mastodon
|
2020-08-07 01:41:59 +00:00
|
|
|
|
2020-08-30 23:33:11 +00:00
|
|
|
public enum PreferencesEndpoint {
|
2020-08-07 01:41:59 +00:00
|
|
|
case preferences
|
|
|
|
}
|
|
|
|
|
2020-08-30 23:59:49 +00:00
|
|
|
extension PreferencesEndpoint: Endpoint {
|
|
|
|
public typealias ResultType = Preferences
|
2020-08-07 01:41:59 +00:00
|
|
|
|
2020-08-30 23:33:11 +00:00
|
|
|
public var pathComponentsInContext: [String] {
|
2020-08-07 01:41:59 +00:00
|
|
|
switch self {
|
2020-08-07 10:14:14 +00:00
|
|
|
case .preferences: return ["preferences"]
|
2020-08-07 01:41:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-30 23:33:11 +00:00
|
|
|
public var method: HTTPMethod {
|
2020-08-07 01:41:59 +00:00
|
|
|
switch self {
|
|
|
|
case .preferences: return .get
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|