1
0
mirror of https://github.com/metabolist/metatext synced 2024-12-18 20:34:43 +01:00
metatext-app-ios-iphone-ipad/MastodonAPI/Sources/MastodonAPIStubs/AccountEndpoint+Stubbing.swift

15 lines
438 B
Swift
Raw Normal View History

2020-08-31 12:21:01 +02:00
// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import MastodonAPI
2020-08-31 12:21:01 +02:00
import Stubbing
extension AccountEndpoint: Stubbing {
public func data(url: URL) -> Data? {
switch self {
2020-08-31 20:57:02 +02:00
case .verifyCredentials: return try? Data(contentsOf: Bundle.module.url(forResource: "account",
withExtension: "json")!)
2020-08-31 12:21:01 +02:00
}
}
}