-
-
Save kylebrowning/70fbec972e62000b2680 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (IBAction)test:(id)sender { | |
DIOSNode *node = [[DIOSNode alloc] initWithDelegate:self]; | |
NSMutableDictionary *nodeData = [NSMutableDictionary new]; | |
[nodeData setValue:@"testtitle" forKey:@"title"]; | |
NSDictionary *bodyValues = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"bodsdfasdfasdy", nil] forKeys:[NSArray arrayWithObjects:@"value", nil]]; | |
NSDictionary *languageDict = [NSDictionary dictionaryWithObject:[NSArray arrayWithObject:bodyValues] forKey:@"und"]; | |
[nodeData setValue:languageDict forKey:@"body"]; | |
[nodeData setValue:@"article" forKey:@"type"]; | |
[nodeData setValue:@"und" forKey:@"language"]; | |
[nodeData setValue:@"admin" forKey:@"name"]; | |
[nodeData setValue:@"7" forKey:@"uid"]; | |
[node nodePost:nodeData]; | |
// [node nodeGet:nodeData]; | |
// [node nodePut:nodeData]; | |
// [node nodeDelete:nodeData]; | |
DIOSComment *comment = [[DIOSComment alloc] init]; | |
NSMutableDictionary *commentData = [NSMutableDictionary new]; | |
bodyValues = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"commentbody", nil] forKeys:[NSArray arrayWithObjects:@"value", nil]]; | |
languageDict = [NSDictionary dictionaryWithObject:[NSArray arrayWithObject:bodyValues] forKey:@"und"]; | |
[commentData setValue:languageDict forKey:@"comment_body"]; | |
[commentData setValue:@"subjecte is changed" forKey:@"subject"]; | |
[commentData setValue:@"und" forKey:@"language"]; | |
// [commentData setValue:@"2" forKey:@"cid"]; | |
[comment commentPost:commentData]; | |
} | |
- (void)nodeGetDidFinish:(BOOL)status operation:(AFHTTPRequestOperation *)operation response:(id)response error:(NSError*)error { | |
[[[DIOSSession sharedSession] delegate] callDidFinish:status operation:operation response:response error:error]; | |
} | |
- (void)nodePostDidFinish:(BOOL)status operation:(AFHTTPRequestOperation *)operation response:(id)response error:(NSError*)error { | |
[[[DIOSSession sharedSession] delegate] callDidFinish:status operation:operation response:response error:error]; | |
} | |
- (void)nodePutDidFinish:(BOOL)status operation:(AFHTTPRequestOperation *)operation response:(id)response error:(NSError *)error { | |
[[[DIOSSession sharedSession] delegate] callDidFinish:status operation:operation response:response error:error]; | |
} | |
- (void)nodeDeleteDidFinish:(BOOL)status operation:(AFHTTPRequestOperation *)operation response:(id)response error:(NSError *)error { | |
[[[DIOSSession sharedSession] delegate] callDidFinish:status operation:operation response:response error:error]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment