28 lines
588 B
Swift
28 lines
588 B
Swift
//
|
|
// Timeline.swift
|
|
// Tusker
|
|
//
|
|
// Created by Anil Korde on 8/21/18.
|
|
// Copyright © 2018 Shadowfacts. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
import MastodonKit
|
|
|
|
enum Timeline {
|
|
|
|
case home, local, federated
|
|
|
|
func request(range: RequestRange = .default) -> Request<[Status]> {
|
|
switch self {
|
|
case .home:
|
|
return Timelines.home(range: range)
|
|
case .local:
|
|
return Timelines.public(local: true, range: range)
|
|
case .federated:
|
|
return Timelines.public(local: false, range: range)
|
|
}
|
|
}
|
|
|
|
}
|