xtool.git
Publicgit clone https://git.maproj.org/xtool.gitxtool.git / Sources / XKit / DeveloperServices / App Groups / DeveloperServicesListAppGroupsRequest.swift
DeveloperServicesListAppGroupsRequest.swift35 lines · 995 BRaw
| 1 | // |
| 2 | // DeveloperServicesListAppGroupsRequest.swift |
| 3 | // Supercharge |
| 4 | // |
| 5 | // Created by Kabir Oberai on 24/07/19. |
| 6 | // Copyright © 2019 Kabir Oberai. All rights reserved. |
| 7 | // |
| 8 | |
| 9 | import Foundation |
| 10 | |
| 11 | public struct DeveloperServicesListAppGroupsRequest: DeveloperServicesPlatformRequest { |
| 12 | |
| 13 | public struct Response: Decodable, Sendable { |
| 14 | public let applicationGroupList: [DeveloperServicesAppGroup] |
| 15 | } |
| 16 | public typealias Value = [DeveloperServicesAppGroup] |
| 17 | |
| 18 | public let platform: DeveloperServicesPlatform |
| 19 | public let teamID: DeveloperServicesTeam.ID |
| 20 | |
| 21 | var subAction: String { return "listApplicationGroups" } |
| 22 | var subParameters: [String: Any] { |
| 23 | return ["teamId": teamID.rawValue] |
| 24 | } |
| 25 | |
| 26 | public func parse(_ response: Response) -> [DeveloperServicesAppGroup] { |
| 27 | response.applicationGroupList |
| 28 | } |
| 29 | |
| 30 | public init(platform: DeveloperServicesPlatform, teamID: DeveloperServicesTeam.ID) { |
| 31 | self.platform = platform |
| 32 | self.teamID = teamID |
| 33 | } |
| 34 | |
| 35 | } |