Created
February 12, 2017 02:18
-
-
Save malshash/9b8eda276d2920649a07dbd43fcc4f9f 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
func fetchData(completion: @escaping () -> Void) { | |
// RestClientSuccessBlock onSuccess = ^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) { | |
// NSDictionary *resultDict = [mappingResult dictionary]; | |
// | |
// dispatch_async(dispatch_get_main_queue(), ^{ | |
// | |
// [self handleResponse:resultDict error:nil]; | |
// | |
// if(completion) { | |
// completion(); | |
// } | |
// | |
// }); | |
// }; | |
// | |
// RestClientFailureBlock onFailure = ^(RKObjectRequestOperation *operation, NSError *error) { | |
// NSLog(@"Hit error: %@ with operation: %@", error.localizedDescription, operation); | |
// dispatch_async(dispatch_get_main_queue(), ^{ | |
// [self handleResponse:nil error:error]; | |
// }); | |
// }; | |
let leadId = self.lead!.id | |
let queryString: String = GraphQLHelper.leadNotes(withLeadId: leadId) | |
let params: [String: String] = ["query": queryString] | |
PortalClient.sharedInstance().graphqlPost(withParameters: params, success: onSuccess, failure: onFailure )) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment