metatext-app-ios-iphone-ipad/MastodonAPI/Sources/MastodonAPIStubs/MastodonTarget+Stubbing.swift

24 lines
567 B
Swift
Raw Normal View History

// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import MastodonAPI
2020-08-31 12:21:01 +02:00
import Stubbing
extension MastodonAPITarget: Stubbing {
2020-08-31 12:21:01 +02:00
public func stub(url: URL) -> HTTPStub? {
(endpoint as? Stubbing)?.stub(url: url)
}
2020-08-31 12:21:01 +02:00
public func data(url: URL) -> Data? {
(endpoint as? Stubbing)?.data(url: url)
}
2020-08-31 12:21:01 +02:00
public func dataString(url: URL) -> String? {
(endpoint as? Stubbing)?.dataString(url: url)
}
2020-08-31 12:21:01 +02:00
public func statusCode(url: URL) -> Int? {
(endpoint as? Stubbing)?.statusCode(url: url)
}
}