F47C3EAC1E5F1AD900D97449 /* ShipMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = F47C3EAB1E5F1AD900D97449 /* ShipMapper.swift */; };
F47C3EAE1E5F26E900D97449 /* DeckMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = F47C3EAD1E5F26E900D97449 /* DeckMapper.swift */; };
F47C3EB01E60500700D97449 /* MaterialMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = F47C3EAF1E60500700D97449 /* MaterialMapper.swift */; };
+ F47C3EB21E60616E00D97449 /* NyukyoDockMapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = F47C3EB11E60616E00D97449 /* NyukyoDockMapper.swift */; };
F490977B1E19C3910085A45D /* HMSuppliesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F490977A1E19C3910085A45D /* HMSuppliesView.swift */; };
F490977D1E19DF390085A45D /* HMSlotItemFrameView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F490977C1E19DF390085A45D /* HMSlotItemFrameView.swift */; };
F490977F1E19ED400085A45D /* HMStrengthenListItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F490977E1E19ED400085A45D /* HMStrengthenListItemView.swift */; };
F47C3EAB1E5F1AD900D97449 /* ShipMapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ShipMapper.swift; sourceTree = "<group>"; };
F47C3EAD1E5F26E900D97449 /* DeckMapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DeckMapper.swift; sourceTree = "<group>"; };
F47C3EAF1E60500700D97449 /* MaterialMapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialMapper.swift; sourceTree = "<group>"; };
+ F47C3EB11E60616E00D97449 /* NyukyoDockMapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NyukyoDockMapper.swift; sourceTree = "<group>"; };
F490977A1E19C3910085A45D /* HMSuppliesView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMSuppliesView.swift; sourceTree = "<group>"; };
F490977C1E19DF390085A45D /* HMSlotItemFrameView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMSlotItemFrameView.swift; sourceTree = "<group>"; };
F490977E1E19ED400085A45D /* HMStrengthenListItemView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMStrengthenListItemView.swift; sourceTree = "<group>"; };
F47C3EAB1E5F1AD900D97449 /* ShipMapper.swift */,
F47C3EAD1E5F26E900D97449 /* DeckMapper.swift */,
F47C3EAF1E60500700D97449 /* MaterialMapper.swift */,
+ F47C3EB11E60616E00D97449 /* NyukyoDockMapper.swift */,
F4A0D7161E2FB7E000224DCE /* HMCompositCommand.swift */,
F44BC6D01E224299004644E3 /* HMPortCommand.swift */,
F44BC6CA1E223208004644E3 /* HMIgnoreCommand.swift */,
F4D05BDF1E0F8B6900688D66 /* HMPowerUpSupportViewController.swift in Sources */,
F44BC6F31E23D32B004644E3 /* HMRealPowerUpCommand.swift in Sources */,
F4E5FF021E150A850026868C /* HMAncherageRepairTimerViewController.swift in Sources */,
+ F47C3EB21E60616E00D97449 /* NyukyoDockMapper.swift in Sources */,
F4AA59521E1E607F001667AF /* HMJSONViewWindowController.swift in Sources */,
F47C3EA61E5F050D00D97449 /* MasterSlotItemMapper.swift in Sources */,
F47215AA1E1F96B60083D3BC /* HMResourceHistoryDataStore.swift in Sources */,
--- /dev/null
+//
+// NyukyoDockMapper.swift
+// KCD
+//
+// Created by Hori,Masaki on 2017/02/24.
+// Copyright © 2017年 Hori,Masaki. All rights reserved.
+//
+
+import Cocoa
+
+fileprivate enum DeckAPI: String {
+ case getMemberNDock = "/kcsapi/api_get_member/ndock"
+ case port = "/kcsapi/api_port/port"
+}
+
+fileprivate func dataKey(_ apiResponse: HMAPIResponse) -> String {
+ guard let deckApi = DeckAPI(rawValue: apiResponse.api)
+ else { return "api_data" }
+ switch deckApi {
+ case .port: return "api_data.api_ndock"
+ default: return "api_data"
+ }
+}
+
+class NyukyoDockMapper: JSONMapper {
+ required init(_ apiResponse: HMAPIResponse) {
+ self.apiResponse = apiResponse
+ self.configuration = MappingConfiguration(entityName: "NyukyoDock",
+ dataKey: dataKey(apiResponse),
+ editorStore: HMServerDataStore.oneTimeEditor())
+ }
+
+ let apiResponse: HMAPIResponse
+ let configuration: MappingConfiguration
+}