Skip to content
This repository has been archived by the owner on Sep 24, 2018. It is now read-only.

Sample code uses ChimpKitRequest, which no longer exists #4

Open
lightbow opened this issue Nov 13, 2014 · 3 comments
Open

Sample code uses ChimpKitRequest, which no longer exists #4

lightbow opened this issue Nov 13, 2014 · 3 comments

Comments

@lightbow
Copy link

With ChimpKit 3.1.1, the completion block to callAPIMethod is ^(NSURLResponse *response, NSData *data, NSError *error) but the sample code uses ChimpKitRequest.

@fabreax
Copy link

fabreax commented Jan 18, 2016

Thanks !

@shalem93
Copy link

This still doesn't work, can we get an update on this???

@jjjjjjjjjjjh
Copy link

@shalem93 Have you given the code sample from the example app a try?

[[ChimpKit sharedKit] callApiMethod:@"lists/subscribe"
                         withParams:params
               andCompletionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
                   NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
                   if (kCKDebug) NSLog(@"Response String: %@", responseString);
                   
                   id parsedResponse = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
                   
                   if (![parsedResponse isKindOfClass:[NSDictionary class]] || ![parsedResponse[@"email"] isKindOfClass:[NSString class]] || error) {
                       // Run Error Code
                   }
               }];

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants