mirror of
https://github.com/metabolist/metatext
synced 2024-12-18 12:28:35 +01:00
14 lines
351 B
Swift
14 lines
351 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
import MastodonAPI
|
|
import Stubbing
|
|
|
|
extension InstanceEndpoint: Stubbing {
|
|
public func data(url: URL) -> Data? {
|
|
switch self {
|
|
case .instance: return try? Data(contentsOf: Bundle.module.url(forResource: "instance", withExtension: "json")!)
|
|
}
|
|
}
|
|
}
|