Manually apply fixes from zorn to fix the RKTwitter example's mapping when using Twitter's JSON feed. Closes #606.

This commit is contained in:
Brian Morton
2012-03-22 09:11:55 -07:00
parent 93c09cf1a0
commit 075636c13b

View File

@@ -47,12 +47,12 @@
// Wed Sep 29 15:31:08 +0000 2010
[RKObjectMapping addDefaultDateFormatterForString:@"E MMM d HH:mm:ss Z y" inTimeZone:nil];
// Register our mappings with the provider using a resource path pattern
statusMapping.rootKeyPath = @"statuses.status";
[objectManager.mappingProvider setObjectMapping:statusMapping forResourcePathPattern:@"/status/user_timeline/:username"];
// Uncomment these lines to use XML, comment it to use JSON
// objectManager.acceptMIMEType = RKMIMETypeXML;
// statusMapping.rootKeyPath = @"statuses.status";
// Uncomment this to use XML, comment it to use JSON
// objectManager.acceptMIMEType = RKMIMETypeXML;
// Register our mappings with the provider using a resource path pattern
[objectManager.mappingProvider setObjectMapping:statusMapping forResourcePathPattern:@"/status/user_timeline/:username"];
// Create Window and View Controllers
RKTwitterViewController* viewController = [[[RKTwitterViewController alloc] initWithNibName:nil bundle:nil] autorelease];