5 // Created by Hori,Masaki on 2014/02/09.
6 // Copyright (c) 2014年 Hori,Masaki. All rights reserved.
9 #import "HMJSONViewCommand.h"
10 #import "HMAppDelegate.h"
15 @interface HMJSONViewCommand ()
19 @implementation HMJSONViewCommand
20 + (BOOL)canExcuteAPI:(NSString *)api
27 dispatch_async(dispatch_get_main_queue(), ^{
28 HMAppDelegate *appDelegate = [[NSApplication sharedApplication] delegate];
30 NSLog(@"api is nil.");
33 if(!self.argumentArray) {
34 NSLog(@"argmentArray is nil.");
38 NSLog(@"jsonTree is nil");
41 if(!self.recieveDate) {
42 NSLog(@"recieveDate is nil.");
45 [appDelegate.jsonViewWindowController setCommand:@{@"api":self.api,
46 @"argument":self.argumentArray,
47 @"json":self.jsonTree,
48 @"recieveDate":self.recieveDate,
49 @"date": [NSDate dateWithTimeIntervalSinceNow:0]}];