OSDN Git Service

guard の書き方を統一した
[kcd/KCD.git] / KCD / MasterSlotItemMapper.swift
index b4ff402..1eeed3c 100644 (file)
@@ -8,13 +8,18 @@
 
 import Cocoa
 
-class MasterSlotItemMapper: JSONMapper {
+final class MasterSlotItemMapper: JSONMapper {
+    
+    typealias ObjectType = MasterSlotItem
+
     let apiResponse: APIResponse
-    let configuration = MappingConfiguration(entityType: MasterSlotItem.self,
-                                             dataKey: "api_data.api_mst_slotitem",
-                                             editorStore: ServerDataStore.oneTimeEditor())
+    let configuration = MappingConfiguration(entity: MasterSlotItem.entity,
+                                             dataKeys: ["api_data", "api_mst_slotitem"],
+                                             editorStore: ServerDataStore.oneTimeEditor(),
+                                             ignoreKeys: ["api_version"])
     
     required init(_ apiResponse: APIResponse) {
+        
         self.apiResponse = apiResponse
     }
 }