Created
March 4, 2014 04:39
-
-
Save cdl/9340388 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
// self.heldStoryPocketID – NSString containing the integer of the Pocket item ID grabbed from the API | |
NSError *error; | |
NSArray *actions = @[@{@"action": @"delete", @"item_id": self.heldStoryPocketID}]; | |
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:actions options:kNilOptions error:&error]; | |
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; | |
NSDictionary *args = @{@"actions": jsonString}; | |
[[PocketAPI sharedAPI] callAPIMethod:@"send" withHTTPMethod:PocketAPIHTTPMethodPOST arguments:args handler:^(PocketAPI *api, NSString *apiMethod, NSDictionary *response, NSError *error) { | |
if (error) { | |
// error | |
} else { | |
// remove story from data source, reload | |
// data in collection view, show notification | |
} | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment