metatext/MastodonAPI/Sources/MastodonAPIStubs/AccessTokenEndpoint+Stubbing.swift

19 lines
456 B
Swift
Raw Normal View History

// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
import MastodonAPI
2020-08-31 10:21:01 +00:00
import Stubbing
extension AccessTokenEndpoint: Stubbing {
2020-08-31 10:21:01 +00:00
public func dataString(url: URL) -> String? {
2020-09-11 09:55:06 +00:00
"""
{
"access_token": "ACCESS_TOKEN_STUB_VALUE",
"token_type": "Bearer",
"scope": "ACCESS_TOKEN_STUB_VALUE_SCOPES",
"created_at": "\(Int(Date().timeIntervalSince1970))"
}
2020-09-11 09:55:06 +00:00
"""
}
}