Created
October 24, 2012 07:29
-
-
Save gonzalezreal/3944553 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| - (SLRequest *)requestForOldTweets | |
| { | |
| TGRTweet *firstTweet = [TGRTweet firstTweetInManagedObjectContext:self.managedObjectContext]; | |
| if (!firstTweet) { | |
| NSLog(@"requestForOldTweets shouldn't be called when the cache is empty"); | |
| return nil; | |
| } | |
| NSNumber *maxIdentifier = [NSNumber numberWithLongLong:[firstTweet.identifier longLongValue] - 1]; | |
| NSDictionary *parameters = @{ | |
| @"include_rts" : @"true", | |
| @"max_id" : [maxIdentifier stringValue] | |
| }; | |
| SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeTwitter | |
| requestMethod:SLRequestMethodGET | |
| URL:[NSURL URLWithString:kHomeTimelineURL] | |
| parameters:parameters]; | |
| request.account = self.account; | |
| return request; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment