OSDN Git Service

AppDelegateからウインドウに関する部分を分離した
[kcd/KCD.git] / KCD / JSONCommand.swift
1 //
2 //  JSONCommand.swift
3 //  KCD
4 //
5 //  Created by Hori,Masaki on 2017/01/19.
6 //  Copyright © 2017年 Hori,Masaki. All rights reserved.
7 //
8
9 import Cocoa
10 import SwiftyJSON
11
12 class JSONCommand {
13     class func canExecuteAPI(_ api: String) -> Bool { return false }
14     
15     let apiResponse: APIResponse
16     
17     required init(apiResponse: APIResponse) {
18         self.apiResponse = apiResponse
19     }
20     
21     var api: String { return apiResponse.api }
22     var parameter: Parameter { return apiResponse.parameter }
23     var json: JSON { return apiResponse.json }
24     
25     var data: JSON { return json["api_data"] }
26
27     func execute() throws {}
28 }