metatext/MastodonAPI/Sources/MastodonAPI/Extensions/Timeline+Extensions.swift
2020-09-03 18:55:46 -07:00

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)
}
}
}