mirror of
https://github.com/metabolist/metatext.git
synced 2024-05-16 23:43:01 +00:00
22 lines
493 B
Swift
22 lines
493 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
import Mastodon
|
|
|
|
public extension Timeline {
|
|
var endpoint: TimelinesEndpoint {
|
|
switch self {
|
|
case .home:
|
|
return .home
|
|
case .local:
|
|
return .public(local: true)
|
|
case .federated:
|
|
return .public(local: false)
|
|
case let .list(list):
|
|
return .list(id: list.id)
|
|
case let .tag(tag):
|
|
return .tag(tag)
|
|
}
|
|
}
|
|
}
|