Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #175 from f1fe/master
Browse files Browse the repository at this point in the history
Correct crash in "Twitter Client"/App.net example
  • Loading branch information
mattt committed May 1, 2013
2 parents ab6f0d4 + 656526b commit 51c5f6e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Examples/Twitter Client/Classes/AppDotNetAPIClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,22 @@ - (id)representationOrArrayOfRepresentationsFromResponseObject:(id)responseObjec
return [responseObject valueForKey:@"data"];
}

- (id)representationOrArrayOfRepresentationsOfEntity:(NSEntityDescription *)entity
fromResponseObject:(id)responseObject
{
id ro = [super representationOrArrayOfRepresentationsOfEntity:entity fromResponseObject:responseObject];

if ([ro isKindOfClass:[NSDictionary class]]) {
id value = nil;
value = [ro valueForKey:@"data"];
if (value) {
return value;
}
}

return ro;
}

- (NSDictionary *)attributesForRepresentation:(NSDictionary *)representation
ofEntity:(NSEntityDescription *)entity
fromResponse:(NSHTTPURLResponse *)response
Expand Down

0 comments on commit 51c5f6e

Please sign in to comment.