mirror of
https://github.com/metabolist/metatext.git
synced 2024-06-02 04:51:21 +00:00
32 lines
659 B
Swift
32 lines
659 B
Swift
// Copyright © 2020 Metabolist. All rights reserved.
|
|
|
|
import Foundation
|
|
import HTTP
|
|
import Mastodon
|
|
|
|
public enum IdentityProofsEndpoint {
|
|
case identityProofs(id: Account.Id)
|
|
}
|
|
|
|
extension IdentityProofsEndpoint: Endpoint {
|
|
public typealias ResultType = [IdentityProof]
|
|
|
|
public var context: [String] {
|
|
defaultContext + ["accounts"]
|
|
}
|
|
|
|
public var pathComponentsInContext: [String] {
|
|
switch self {
|
|
case let .identityProofs(id):
|
|
return [id, "identity_proofs"]
|
|
}
|
|
}
|
|
|
|
public var method: HTTPMethod {
|
|
switch self {
|
|
case .identityProofs:
|
|
return .get
|
|
}
|
|
}
|
|
}
|