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/AccessTokenEndpoint+Stubbing.swift
2020-07-31 00:13:54 -07:00

20 lines
517 B
Swift

// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
extension AccessTokenEndpoint: Stubbing {
func dataString(url: URL) -> String? {
switch self {
case let .oauthToken(_, _, _, _, scopes, _):
return """
{
"access_token": "ACCESS_TOKEN_STUB_VALUE",
"token_type": "Bearer",
"scope": "\(scopes)",
"created_at": "\(Int(Date().timeIntervalSince1970))"
}
"""
}
}
}