2020-07-29 23:50:30 +00:00
|
|
|
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
|
|
|
|
import Foundation
|
2020-09-04 01:55:46 +00:00
|
|
|
import MastodonAPI
|
2020-08-31 10:21:01 +00:00
|
|
|
import Stubbing
|
2020-07-29 23:50:30 +00:00
|
|
|
|
2020-09-04 01:55:46 +00:00
|
|
|
extension MastodonAPITarget: Stubbing {
|
2020-08-31 10:21:01 +00:00
|
|
|
public func stub(url: URL) -> HTTPStub? {
|
2020-07-29 23:50:30 +00:00
|
|
|
(endpoint as? Stubbing)?.stub(url: url)
|
|
|
|
}
|
|
|
|
|
2020-08-31 10:21:01 +00:00
|
|
|
public func data(url: URL) -> Data? {
|
2020-07-29 23:50:30 +00:00
|
|
|
(endpoint as? Stubbing)?.data(url: url)
|
|
|
|
}
|
|
|
|
|
2020-08-31 10:21:01 +00:00
|
|
|
public func dataString(url: URL) -> String? {
|
2020-07-29 23:50:30 +00:00
|
|
|
(endpoint as? Stubbing)?.dataString(url: url)
|
|
|
|
}
|
|
|
|
|
2020-08-31 10:21:01 +00:00
|
|
|
public func statusCode(url: URL) -> Int? {
|
2020-07-29 23:50:30 +00:00
|
|
|
(endpoint as? Stubbing)?.statusCode(url: url)
|
|
|
|
}
|
|
|
|
}
|