1
0
mirror of https://github.com/metabolist/metatext synced 2024-12-22 07:54:56 +01:00
metatext-app-ios-iphone-ipad/Development Assets/Mastodon API Stubs/MastodonTarget+Stubbing.swift
2020-07-31 00:13:54 -07:00

22 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)
}
}