Permalink
Browse files

Un depreciated setting the username in MGTwitterEngine.

This is to clean up the method definitions for Lists. A number of the calls require the user to the
authorised user (like list creation) which means it doesn't make sense to be able to specify a user.

This may change in the future should Twitter allow people to collaborate on lists.
  • Loading branch information...
1 parent 50b5d65 commit 60d02adc4b841fbfab0412152629a26d6bc1b394 @tarasis tarasis committed with alexrepty Aug 28, 2010
Showing with 12 additions and 1 deletion.
  1. +3 −0 AppController.m
  2. +3 −1 MGTwitterEngine.h
  3. +6 −0 MGTwitterEngine.m
View
@@ -30,6 +30,9 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
twitterEngine = [[MGTwitterEngine alloc] initWithDelegate:self];
[twitterEngine setUsesSecureConnection:NO];
[twitterEngine setConsumerKey:consumerKey secret:consumerSecret];
+ // This has been undepreciated for the purposes of dealing with Lists.
+ // At present the list API calls require you to specify a user that owns the list.
+ [twitterEngine setUsername:username];
[twitterEngine getXAuthAccessTokenForUsername:username password:password];
}
View
@@ -231,7 +231,9 @@
@interface MGTwitterEngine (BasicAuth)
-- (NSString *)username DEPRECATED_ATTRIBUTE;
+- (NSString *)username;
+- (void)setUsername:(NSString *) newUsername;
+
- (NSString *)password DEPRECATED_ATTRIBUTE;
- (void)setUsername:(NSString *)username password:(NSString *)password DEPRECATED_ATTRIBUTE;
View
@@ -1988,6 +1988,12 @@ - (NSString *)username
return [[_username retain] autorelease];
}
+- (void)setUsername:(NSString *)newUsername
+{
+ // Set new credentials.
+ [_username release];
+ _username = [newUsername retain];
+}
- (NSString *)password
{

0 comments on commit 60d02ad

Please sign in to comment.