metatext/Development Assets/Mastodon API Stubs/MastodonTarget+Stubbing.swift
2020-07-31 00:13:54 -07:00

21 lines
501 B
Swift

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