mirror of
https://github.com/metabolist/metatext.git
synced 2024-06-20 06:00:44 +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)
|
||
|
}
|
||
|
}
|
||
|
}
|