mirror of
https://github.com/metabolist/metatext.git
synced 2024-06-01 07:08:07 +00:00
22 lines
537 B
Swift
22 lines
537 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
import Mastodon
|
|
|
|
public extension Timeline {
|
|
var endpoint: StatusesEndpoint {
|
|
switch self {
|
|
case .home:
|
|
return .timelinesHome
|
|
case .local:
|
|
return .timelinesPublic(local: true)
|
|
case .federated:
|
|
return .timelinesPublic(local: false)
|
|
case let .list(list):
|
|
return .timelinesList(id: list.id)
|
|
case let .tag(tag):
|
|
return .timelinesTag(tag)
|
|
}
|
|
}
|
|
}
|