OSDN Git Service

staticプロパティをインスタンスプロパティに変更
[kcd/KCD.git] / KCD / NyukyoDockMapper.swift
index b5032d6..1ee4a0d 100644 (file)
@@ -16,9 +16,10 @@ final class NyukyoDockMapper: JSONMapper {
     required init(_ apiResponse: APIResponse) {
         
         self.apiResponse = apiResponse
-        self.configuration = MappingConfiguration(entity: NyukyoDock.entity,
+        self.configuration = MappingConfiguration(entity: NyukyoDock.self,
                                                   dataKeys: NyukyoDockMapper.dataKeys(apiResponse),
-                                                  editorStore: ServerDataStore.oneTimeEditor())
+                                                  editorStore: ServerDataStore.oneTimeEditor(),
+                                                  ignoreKeys: ["api_member_id"])
     }
     
     private class func dataKeys(_ apiResponse: APIResponse) -> [String] {
@@ -29,7 +30,11 @@ final class NyukyoDockMapper: JSONMapper {
             
         case .ndock: return ["api_data"]
             
-        default: return Logger.shared.log("Missing API: \(apiResponse.api)", value: ["api_data"])
+        default:
+            
+            Logger.shared.log("Missing API: \(apiResponse.api)")
+            
+            return ["api_data"]
         }
     }
 }