Permalink
Browse files

support for sending retweets

  • Loading branch information...
Michael Tomasello authored and stevestreza committed Apr 14, 2010
1 parent c6b5911 commit 1a61a5c28496ffcc18f3c10b3a0601af90eedc53
Showing with 10 additions and 1 deletion.
  1. +1 −1 MGTwitterEngine.h
  2. +8 −0 MGTwitterEngine.m
  3. +1 −0 MGTwitterRequestTypes.h
View
@@ -104,7 +104,7 @@
- (NSString *)sendUpdate:(NSString *)status withLatitude:(MGTwitterEngineLocationDegrees)latitude longitude:(MGTwitterEngineLocationDegrees)longitude; // statuses/update
- (NSString *)sendUpdate:(NSString *)status inReplyTo:(MGTwitterEngineID)updateID; // statuses/update
- (NSString *)sendUpdate:(NSString *)status inReplyTo:(MGTwitterEngineID)updateID withLatitude:(MGTwitterEngineLocationDegrees)latitude longitude:(MGTwitterEngineLocationDegrees)longitude; // statuses/update
-
+- (NSString *)sendRetweet:(MGTwitterEngineID)tweetID; // statuses/retweet
- (NSString *)getRepliesStartingAtPage:(int)pageNum; // statuses/mentions
- (NSString *)getRepliesSinceID:(MGTwitterEngineID)sinceID startingAtPage:(int)pageNum count:(int)count; // statuses/mentions
View
@@ -1202,6 +1202,14 @@ - (NSString *)sendUpdate:(NSString *)status inReplyTo:(MGTwitterEngineID)updateI
responseType:MGTwitterStatus];
}
+- (NSString *)sendRetweet:(MGTwitterEngineID)tweetID {
+ NSString *path = [NSString stringWithFormat:@"statuses/retweet/%llu.%@", tweetID, API_FORMAT];
+
+ return [self _sendRequestWithMethod:HTTP_POST_METHOD path:path
+ queryParameters:nil body:nil
+ requestType:MGTwitterRetweetSendRequest
+ responseType:MGTwitterStatus];
+}
#pragma mark -
View
@@ -18,6 +18,7 @@ typedef enum _MGTwitterRequestType {
MGTwitterUpdateSendRequest, // send a new update for the current user
MGTwitterUpdateDeleteRequest, // delete an update for the current user using the specified id
MGTwitterRepliesRequest, // latest reply status for the current user
+ MGTwitterRetweetSendRequest, // send a new retweet for the current user
MGTwitterFeaturedUsersRequest, // latest status from featured users
MGTwitterFriendUpdatesRequest, // last status for the people that the current user follows
MGTwitterFriendUpdatesForUserRequest, // last status for the people that the specified user follows

0 comments on commit 1a61a5c

Please sign in to comment.