We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f844a2 commit 3a80dbcCopy full SHA for 3a80dbc
1 file changed
Example/Classes/Models/Post.m
@@ -48,7 +48,8 @@ - (id)initWithAttributes:(NSDictionary *)attributes {
48
49
+ (void)globalTimelinePostsWithBlock:(void (^)(NSArray *posts, NSError *error))block {
50
[[AFAppDotNetAPIClient sharedClient] getPath:@"stream/0/posts/stream/global" parameters:nil success:^(AFHTTPRequestOperation *operation, id JSON) {
51
- NSMutableArray *mutablePosts = [NSMutableArray arrayWithCapacity:[JSON count]];
+ NSArray *postsFromResponse = [JSON valueForKeyPath:@"data"];
52
+ NSMutableArray *mutablePosts = [NSMutableArray arrayWithCapacity:[postsFromResponse count]];
53
for (NSDictionary *attributes in JSON) {
54
Post *post = [[Post alloc] initWithAttributes:attributes];
55
[mutablePosts addObject:post];
0 commit comments