mirror of
https://github.com/metabolist/metatext.git
synced 2024-06-27 01:20:32 +00:00
24 lines
461 B
Swift
24 lines
461 B
Swift
|
// Copyright © 2020 Metabolist. All rights reserved.
|
||
|
|
||
|
import Foundation
|
||
|
|
||
|
enum PreferencesEndpoint {
|
||
|
case preferences
|
||
|
}
|
||
|
|
||
|
extension PreferencesEndpoint: MastodonEndpoint {
|
||
|
typealias ResultType = MastodonPreferences
|
||
|
|
||
|
var pathComponentsInContext: [String] {
|
||
|
switch self {
|
||
|
case .preferences: return ["instance"]
|
||
|
}
|
||
|
}
|
||
|
|
||
|
var method: HTTPMethod {
|
||
|
switch self {
|
||
|
case .preferences: return .get
|
||
|
}
|
||
|
}
|
||
|
}
|