1
0
mirror of https://github.com/metabolist/metatext synced 2024-12-14 18:35:37 +01:00
metatext-app-ios-iphone-ipad/MastodonAPI/Sources/MastodonAPIStubs/MastodonTarget+Stubbing.swift
2020-09-03 18:55:46 -07:00

24 lines
567 B
Swift

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