Skip to content
Browse files

Added method to get information on a specific list with ID

  • Loading branch information...
1 parent 1ffd92e commit 470d5d5a1b539347f3069a689b6c65dfdcb94d47 @catsby catsby committed with alexrepty Aug 14, 2010
Showing with 19 additions and 0 deletions.
  1. +3 −0 MGTwitterEngine.h
  2. +16 −0 MGTwitterEngine.m
View
3 MGTwitterEngine.h
@@ -148,6 +148,9 @@
// update an existing list
- (NSString *)updateListForUser:(NSString *)username withID:(MGTwitterEngineID)listID withOptions:(NSDictionary *)options;
+// Show the specified list. Private lists will only be shown if the authenticated user owns the specified list.
+- (NSString *)getListForUser:(NSString *)username withID:(MGTwitterEngineID)listID;
+
// Direct Message methods
- (NSString *)getDirectMessagesSinceID:(MGTwitterEngineID)sinceID startingAtPage:(int)pageNum; // direct_messages
View
16 MGTwitterEngine.m
@@ -1611,6 +1611,22 @@ - (NSString *)updateListForUser:(NSString *)username withID:(MGTwitterEngineID)l
responseType:MGTwitterUserLists];
}
+- (NSString *)getListForUser:(NSString *)username withID:(MGTwitterEngineID)listID
+{
+ if (!username || !listID) {
+ NSLog(@"returning nil");
+ return nil;
+ }
+ NSString *path = [NSString stringWithFormat:@"%@/lists/%llu.%@", username, listID, API_FORMAT];
+
+ NSString *body = [self _queryStringWithBase:nil parameters:nil prefixed:NO];
+
+ return [self _sendRequestWithMethod:nil path:path
+ queryParameters:nil body:body
+ requestType:MGTwitterUserListCreate
+ responseType:MGTwitterUserLists];
+}
+
#pragma mark Friendship methods

0 comments on commit 470d5d5

Please sign in to comment.
Something went wrong with that request. Please try again.