From 37322e6a59034f7d5625dbf04410faee5032c020 Mon Sep 17 00:00:00 2001 From: Nikita Lutsenko Date: Wed, 2 Dec 2015 09:28:54 -0800 Subject: [PATCH 1/5] Replace /*! with /** for new doc generation. --- .../Internal/Dialog/PFOAuth1FlowDialog.h | 12 +++---- .../Internal/PFTwitterPrivateUtilities.h | 2 +- .../Internal/PF_Twitter_Private.h | 2 +- ParseTwitterUtils/PFTwitterUtils.h | 34 +++++++++---------- ParseTwitterUtils/PF_Twitter.h | 20 +++++------ ParseTwitterUtils/PF_Twitter.m | 4 +-- Tests/Other/PFTwitterTestMacros.h | 2 +- 7 files changed, 38 insertions(+), 38 deletions(-) diff --git a/ParseTwitterUtils/Internal/Dialog/PFOAuth1FlowDialog.h b/ParseTwitterUtils/Internal/Dialog/PFOAuth1FlowDialog.h index e8e6354..9adc38c 100644 --- a/ParseTwitterUtils/Internal/Dialog/PFOAuth1FlowDialog.h +++ b/ParseTwitterUtils/Internal/Dialog/PFOAuth1FlowDialog.h @@ -14,7 +14,7 @@ @protocol PFOAuth1FlowDialogDataSource -/*! +/** Asks if a link touched by a user should be opened in an external browser. If a user touches a link, the default behavior is to open the link in the Safari browser, @@ -30,7 +30,7 @@ typedef void (^PFOAuth1FlowDialogCompletion)(BOOL succeeded, NSURL *url, NSError *error); -/*! +/** To allow for greater mockability, this protocol exposes all of the methods implemented by PFOAuth1FlowDialog. */ @protocol PFOAuth1FlowDialogInterface @@ -41,25 +41,25 @@ typedef void (^PFOAuth1FlowDialogCompletion)(BOOL succeeded, NSURL *url, NSError @property (nonatomic, copy) NSDictionary *queryParameters; @property (nonatomic, copy) NSString *redirectURLPrefix; -/*! +/** The title that is shown in the header atop the view. */ @property (nonatomic, copy) NSString *title; + (instancetype)dialogWithURL:(NSURL *)url queryParameters:(NSDictionary *)queryParameters; -/*! +/** The view will be added to the top of the current key window. */ - (void)showAnimated:(BOOL)animated; -/*! +/** Hides the view. This method does not call the completion block. */ - (void)dismissAnimated:(BOOL)animated; -/*! +/** Displays a URL in the dialog. */ - (void)loadURL:(NSURL *)url queryParameters:(NSDictionary *)parameters; diff --git a/ParseTwitterUtils/Internal/PFTwitterPrivateUtilities.h b/ParseTwitterUtils/Internal/PFTwitterPrivateUtilities.h index 62c02ae..f556d2b 100644 --- a/ParseTwitterUtils/Internal/PFTwitterPrivateUtilities.h +++ b/ParseTwitterUtils/Internal/PFTwitterPrivateUtilities.h @@ -32,7 +32,7 @@ @end -/*! +/** Raises an `NSInternalInconsistencyException` if the `condition` does not pass. Use `description` to supply the way to fix the exception. */ diff --git a/ParseTwitterUtils/Internal/PF_Twitter_Private.h b/ParseTwitterUtils/Internal/PF_Twitter_Private.h index f714c05..2d69c55 100644 --- a/ParseTwitterUtils/Internal/PF_Twitter_Private.h +++ b/ParseTwitterUtils/Internal/PF_Twitter_Private.h @@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN urlSession:(NSURLSession *)urlSession dialogClass:(Class)dialogClass; -/*! +/** Obtain access to the local twitter account. Returns the twitter account if access is obtained. Otherwise, returns null. */ diff --git a/ParseTwitterUtils/PFTwitterUtils.h b/ParseTwitterUtils/PFTwitterUtils.h index 99ccca5..f7e6395 100644 --- a/ParseTwitterUtils/PFTwitterUtils.h +++ b/ParseTwitterUtils/PFTwitterUtils.h @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN @class BFTask PF_GENERIC(__covariant BFGenericType); @class PF_Twitter; -/*! +/** The `PFTwitterUtils` class provides utility functions for working with Twitter in a Parse application. This class is currently for iOS only. @@ -28,14 +28,14 @@ NS_ASSUME_NONNULL_BEGIN /// @name Interacting With Twitter ///-------------------------------------- -/*! +/** @abstract Gets the instance of the object that Parse uses. @returns An instance of object. */ + (nullable PF_Twitter *)twitter; -/*! +/** @abstract Initializes the Twitter singleton. @warning You must invoke this in order to use the Twitter functionality in Parse. @@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN */ + (void)initializeWithConsumerKey:(NSString *)consumerKey consumerSecret:(NSString *)consumerSecret; -/*! +/** @abstract Whether the user has their account linked to Twitter. @param user User to check for a Twitter link. The user must be logged in on this device. @@ -58,7 +58,7 @@ NS_ASSUME_NONNULL_BEGIN /// @name Logging In & Creating Twitter-Linked Users ///-------------------------------------- -/*! +/** @abstract *Asynchronously* logs in a user using Twitter. @discussion This method delegates to Twitter to authenticate the user, @@ -68,7 +68,7 @@ NS_ASSUME_NONNULL_BEGIN */ + (BFTask PF_GENERIC(PFUser *)*)logInInBackground; -/*! +/** @abstract *Asynchronously* logs in a user using Twitter. @discussion This method delegates to Twitter to authenticate the user, @@ -91,7 +91,7 @@ NS_ASSUME_NONNULL_BEGIN */ + (void)logInWithTarget:(nullable id)target selector:(nullable SEL)selector; -/*! +/** @abstract *Asynchronously* logs in a user using Twitter. @discussion Allows you to handle user login to Twitter, then provide authentication @@ -109,7 +109,7 @@ NS_ASSUME_NONNULL_BEGIN authToken:(NSString *)authToken authTokenSecret:(NSString *)authTokenSecret; -/*! +/** @abstract Logs in a user using Twitter. @discussion Allows you to handle user login to Twitter, then provide authentication data @@ -153,7 +153,7 @@ NS_ASSUME_NONNULL_BEGIN /// @name Linking Users with Twitter ///-------------------------------------- -/*! +/** @abstract *Asynchronously* links Twitter to an existing PFUser. @discussion This method delegates to Twitter to authenticate the user, @@ -165,7 +165,7 @@ NS_ASSUME_NONNULL_BEGIN */ + (void)linkUser:(PFUser *)user PARSE_DEPRECATED("Please use +linkUserInBackground: instead."); -/*! +/** @abstract *Asynchronously* links Twitter to an existing . @discussion This method delegates to Twitter to authenticate the user, @@ -177,7 +177,7 @@ NS_ASSUME_NONNULL_BEGIN */ + (BFTask PF_GENERIC(NSNumber *)*)linkUserInBackground:(PFUser *)user; -/*! +/** @abstract *Asynchronously* links Twitter to an existing . @discussion This method delegates to Twitter to authenticate the user, @@ -202,7 +202,7 @@ NS_ASSUME_NONNULL_BEGIN */ + (void)linkUser:(PFUser *)user target:(nullable id)target selector:(nullable SEL)selector; -/*! +/** @abstract *Asynchronously* links Twitter to an existing PFUser asynchronously. @discussion Allows you to handle user login to Twitter, @@ -221,7 +221,7 @@ NS_ASSUME_NONNULL_BEGIN authToken:(NSString *)authToken authTokenSecret:(NSString *)authTokenSecret; -/*! +/** @abstract *Asynchronously* links Twitter to an existing . @discussionAllows you to handle user login to Twitter, @@ -269,7 +269,7 @@ NS_ASSUME_NONNULL_BEGIN /// @name Unlinking Users from Twitter ///-------------------------------------- -/*! +/** @abstract *Synchronously* unlinks the from a Twitter account. @param user User to unlink from Twitter. @@ -278,7 +278,7 @@ NS_ASSUME_NONNULL_BEGIN */ + (BOOL)unlinkUser:(PFUser *)user; -/*! +/** @abstract *Synchronously* unlinks the PFUser from a Twitter account. @param user User to unlink from Twitter. @@ -288,7 +288,7 @@ NS_ASSUME_NONNULL_BEGIN */ + (BOOL)unlinkUser:(PFUser *)user error:(NSError **)error; -/*! +/** @abstract Makes an *asynchronous* request to unlink a user from a Twitter account. @param user User to unlink from Twitter. @@ -297,7 +297,7 @@ NS_ASSUME_NONNULL_BEGIN */ + (BFTask PF_GENERIC(NSNumber *)*)unlinkUserInBackground:(PFUser *)user; -/*! +/** @abstract Makes an *asynchronous* request to unlink a user from a Twitter account. @param user User to unlink from Twitter. diff --git a/ParseTwitterUtils/PF_Twitter.h b/ParseTwitterUtils/PF_Twitter.h index a2f0a10..95f9257 100644 --- a/ParseTwitterUtils/PF_Twitter.h +++ b/ParseTwitterUtils/PF_Twitter.h @@ -15,43 +15,43 @@ NS_ASSUME_NONNULL_BEGIN @class BFTask PF_GENERIC(__covariant BFGenericType); -/*! +/** The `PF_Twitter` class is a simple interface for interacting with the Twitter REST API, automating sign-in and OAuth signing of requests against the API. */ @interface PF_Twitter : NSObject -/*! +/** @abstract Consumer key of the application that is used to authorize with Twitter. */ @property (nullable, nonatomic, copy) NSString *consumerKey; -/*! +/** @abstract Consumer secret of the application that is used to authorize with Twitter. */ @property (nullable, nonatomic, copy) NSString *consumerSecret; -/*! +/** @abstract Auth token for the current user. */ @property (nullable, nonatomic, copy) NSString *authToken; -/*! +/** @abstract Auth token secret for the current user. */ @property (nullable, nonatomic, copy) NSString *authTokenSecret; -/*! +/** @abstract Twitter user id of the currently signed in user. */ @property (nullable, nonatomic, copy) NSString *userId; -/*! +/** @abstract Twitter screen name of the currently signed in user. */ @property (nullable, nonatomic, copy) NSString *screenName; -/*! +/** @abstract Displays an auth dialog and populates the authToken, authTokenSecret, userId, and screenName properties if the Twitter user grants permission to the application. @@ -59,7 +59,7 @@ NS_ASSUME_NONNULL_BEGIN */ - (BFTask *)authorizeInBackground; -/*! +/** @abstract Displays an auth dialog and populates the authToken, authTokenSecret, userId, and screenName properties if the Twitter user grants permission to the application. @@ -71,7 +71,7 @@ NS_ASSUME_NONNULL_BEGIN failure:(nullable void (^)(NSError *__nullable error))failure cancel:(nullable void (^)(void))cancel; -/*! +/** @abstract Adds a 3-legged OAuth signature to an `NSMutableURLRequest` based upon the properties set for the Twitter object. diff --git a/ParseTwitterUtils/PF_Twitter.m b/ParseTwitterUtils/PF_Twitter.m index 75c705d..4d2af46 100644 --- a/ParseTwitterUtils/PF_Twitter.m +++ b/ParseTwitterUtils/PF_Twitter.m @@ -153,7 +153,7 @@ - (BFTask *)_showWebViewDialogAsync:(NSString *)requestToken requestSecret:(NSSt return source.task; } -/*! +/** Get the request token for the authentication. This is the first step in auth. if isReverseAuth is YES then get the request token for reverse auth mode. Otherwise, get the request token for web auth mode. */ @@ -227,7 +227,7 @@ - (BFTask *)_getAccessTokenForWebAuthAsync:(NSString *)verifier return taskCompletionSource.task; } -/*! +/** Get the access token for reverse authentication. If the Task is successful then, Task result is dictionary containing logged in user's Auth token, Screenname and other attributes. */ diff --git a/Tests/Other/PFTwitterTestMacros.h b/Tests/Other/PFTwitterTestMacros.h index 737f4a7..5c1461e 100644 --- a/Tests/Other/PFTwitterTestMacros.h +++ b/Tests/Other/PFTwitterTestMacros.h @@ -10,7 +10,7 @@ #ifndef PFTwitterTestMacros_h #define PFTwitterTestMacros_h -/*! +/** To prevent retain cycles by OCMock, this macro allows us to capture a weak reference to return from a stubbed method. */ #define andReturnWeak(variable) _andDo( \ From d712bc0d31d7435500e58ccadc69b61eeb31c6a4 Mon Sep 17 00:00:00 2001 From: Nikita Lutsenko Date: Wed, 2 Dec 2015 09:30:10 -0800 Subject: [PATCH 2/5] Update style of cross link annotations in all of the documentation. --- ParseTwitterUtils/PFTwitterUtils.h | 42 +++++++++++++++--------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/ParseTwitterUtils/PFTwitterUtils.h b/ParseTwitterUtils/PFTwitterUtils.h index f7e6395..ca9d2f3 100644 --- a/ParseTwitterUtils/PFTwitterUtils.h +++ b/ParseTwitterUtils/PFTwitterUtils.h @@ -29,9 +29,9 @@ NS_ASSUME_NONNULL_BEGIN ///-------------------------------------- /** - @abstract Gets the instance of the object that Parse uses. + @abstract Gets the instance of the `PF_Twitter` object that Parse uses. - @returns An instance of object. + @returns An instance of `PF_Twitter` object. */ + (nullable PF_Twitter *)twitter; @@ -62,7 +62,7 @@ NS_ASSUME_NONNULL_BEGIN @abstract *Asynchronously* logs in a user using Twitter. @discussion This method delegates to Twitter to authenticate the user, - and then automatically logs in (or creates, in the case where it is a new user) a . + and then automatically logs in (or creates, in the case where it is a new user) a `PFUser`. @returns The task, that encapsulates the work being done. */ @@ -72,7 +72,7 @@ NS_ASSUME_NONNULL_BEGIN @abstract *Asynchronously* logs in a user using Twitter. @discussion This method delegates to Twitter to authenticate the user, - and then automatically logs in (or creates, in the case where it is a new user) . + and then automatically logs in (or creates, in the case where it is a new user) `PFUser`. @param block The block to execute. It should have the following argument signature: `^(PFUser *user, NSError *error)`. @@ -83,7 +83,7 @@ NS_ASSUME_NONNULL_BEGIN @abstract *Asynchronously* Logs in a user using Twitter. @discussion This method delegates to Twitter to authenticate the user, - and then automatically logs in (or creates, in the case where it is a new user) a . + and then automatically logs in (or creates, in the case where it is a new user) a `PFUser`. @param target Target object for the selector @param selector The selector that will be called when the asynchrounous request is complete. @@ -95,7 +95,7 @@ NS_ASSUME_NONNULL_BEGIN @abstract *Asynchronously* logs in a user using Twitter. @discussion Allows you to handle user login to Twitter, then provide authentication - data to log in (or create, in the case where it is a new user) the . + data to log in (or create, in the case where it is a new user) the `PFUser`. @param twitterId The id of the Twitter user being linked. @param screenName The screen name of the Twitter user being linked. @@ -113,7 +113,7 @@ NS_ASSUME_NONNULL_BEGIN @abstract Logs in a user using Twitter. @discussion Allows you to handle user login to Twitter, then provide authentication data - to log in (or create, in the case where it is a new user) the . + to log in (or create, in the case where it is a new user) the `PFUser`. @param twitterId The id of the Twitter user being linked @param screenName The screen name of the Twitter user being linked @@ -132,7 +132,7 @@ NS_ASSUME_NONNULL_BEGIN @abstract Logs in a user using Twitter. @discussion Allows you to handle user login to Twitter, then provide authentication data - to log in (or create, in the case where it is a new user) the . + to log in (or create, in the case where it is a new user) the `PFUser`. @param twitterId The id of the Twitter user being linked. @param screenName The screen name of the Twitter user being linked. @@ -157,7 +157,7 @@ NS_ASSUME_NONNULL_BEGIN @abstract *Asynchronously* links Twitter to an existing PFUser. @discussion This method delegates to Twitter to authenticate the user, - and then automatically links the account to the . + and then automatically links the account to the `PFUser`. @param user User to link to Twitter. @@ -166,10 +166,10 @@ NS_ASSUME_NONNULL_BEGIN + (void)linkUser:(PFUser *)user PARSE_DEPRECATED("Please use +linkUserInBackground: instead."); /** - @abstract *Asynchronously* links Twitter to an existing . + @abstract *Asynchronously* links Twitter to an existing `PFUser`. @discussion This method delegates to Twitter to authenticate the user, - and then automatically links the account to the . + and then automatically links the account to the `PFUser`. @param user User to link to Twitter. @@ -178,10 +178,10 @@ NS_ASSUME_NONNULL_BEGIN + (BFTask PF_GENERIC(NSNumber *)*)linkUserInBackground:(PFUser *)user; /** - @abstract *Asynchronously* links Twitter to an existing . + @abstract *Asynchronously* links Twitter to an existing `PFUser`. @discussion This method delegates to Twitter to authenticate the user, - and then automatically links the account to the . + and then automatically links the account to the `PFUser`. @param user User to link to Twitter. @param block The block to execute. @@ -190,10 +190,10 @@ NS_ASSUME_NONNULL_BEGIN + (void)linkUser:(PFUser *)user block:(nullable PFBooleanResultBlock)block; /* - @abstract *Asynchronously* links Twitter to an existing . + @abstract *Asynchronously* links Twitter to an existing `PFUser`. @discussion This method delegates to Twitter to authenticate the user, - and then automatically links the account to the . + and then automatically links the account to the `PFUser`. @param user User to link to Twitter. @param target Target object for the selector @@ -206,7 +206,7 @@ NS_ASSUME_NONNULL_BEGIN @abstract *Asynchronously* links Twitter to an existing PFUser asynchronously. @discussion Allows you to handle user login to Twitter, - then provide authentication data to link the account to the . + then provide authentication data to link the account to the `PFUser`. @param user User to link to Twitter. @param twitterId The id of the Twitter user being linked. @@ -222,10 +222,10 @@ NS_ASSUME_NONNULL_BEGIN authTokenSecret:(NSString *)authTokenSecret; /** - @abstract *Asynchronously* links Twitter to an existing . + @abstract *Asynchronously* links Twitter to an existing `PFUser`. @discussionAllows you to handle user login to Twitter, - then provide authentication data to link the account to the . + then provide authentication data to link the account to the `PFUser`. @param user User to link to Twitter. @param twitterId The id of the Twitter user being linked. @@ -243,10 +243,10 @@ NS_ASSUME_NONNULL_BEGIN block:(nullable PFBooleanResultBlock)block; /* - @abstract Links Twitter to an existing . + @abstract Links Twitter to an existing `PFUser`. @discussion This method allows you to handle user login to Twitter, - then provide authentication data to link the account to the . + then provide authentication data to link the account to the `PFUser`. @param user User to link to Twitter. @param twitterId The id of the Twitter user being linked. @@ -270,7 +270,7 @@ NS_ASSUME_NONNULL_BEGIN ///-------------------------------------- /** - @abstract *Synchronously* unlinks the from a Twitter account. + @abstract *Synchronously* unlinks the `PFUser` from a Twitter account. @param user User to unlink from Twitter. From f492978be36661ed4f7107d5c42fdb873b975fef Mon Sep 17 00:00:00 2001 From: Nikita Lutsenko Date: Wed, 2 Dec 2015 09:30:37 -0800 Subject: [PATCH 3/5] Remove abstract keyword from method documentation. --- ParseTwitterUtils/PFTwitterUtils.h | 42 +++++++++++++++--------------- ParseTwitterUtils/PF_Twitter.h | 18 ++++++------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/ParseTwitterUtils/PFTwitterUtils.h b/ParseTwitterUtils/PFTwitterUtils.h index ca9d2f3..19e2e09 100644 --- a/ParseTwitterUtils/PFTwitterUtils.h +++ b/ParseTwitterUtils/PFTwitterUtils.h @@ -29,14 +29,14 @@ NS_ASSUME_NONNULL_BEGIN ///-------------------------------------- /** - @abstract Gets the instance of the `PF_Twitter` object that Parse uses. + Gets the instance of the `PF_Twitter` object that Parse uses. @returns An instance of `PF_Twitter` object. */ + (nullable PF_Twitter *)twitter; /** - @abstract Initializes the Twitter singleton. + Initializes the Twitter singleton. @warning You must invoke this in order to use the Twitter functionality in Parse. @@ -46,7 +46,7 @@ NS_ASSUME_NONNULL_BEGIN + (void)initializeWithConsumerKey:(NSString *)consumerKey consumerSecret:(NSString *)consumerSecret; /** - @abstract Whether the user has their account linked to Twitter. + Whether the user has their account linked to Twitter. @param user User to check for a Twitter link. The user must be logged in on this device. @@ -59,7 +59,7 @@ NS_ASSUME_NONNULL_BEGIN ///-------------------------------------- /** - @abstract *Asynchronously* logs in a user using Twitter. + *Asynchronously* logs in a user using Twitter. @discussion This method delegates to Twitter to authenticate the user, and then automatically logs in (or creates, in the case where it is a new user) a `PFUser`. @@ -69,7 +69,7 @@ NS_ASSUME_NONNULL_BEGIN + (BFTask PF_GENERIC(PFUser *)*)logInInBackground; /** - @abstract *Asynchronously* logs in a user using Twitter. + *Asynchronously* logs in a user using Twitter. @discussion This method delegates to Twitter to authenticate the user, and then automatically logs in (or creates, in the case where it is a new user) `PFUser`. @@ -80,7 +80,7 @@ NS_ASSUME_NONNULL_BEGIN + (void)logInWithBlock:(nullable PFUserResultBlock)block; /* - @abstract *Asynchronously* Logs in a user using Twitter. + *Asynchronously* Logs in a user using Twitter. @discussion This method delegates to Twitter to authenticate the user, and then automatically logs in (or creates, in the case where it is a new user) a `PFUser`. @@ -92,7 +92,7 @@ NS_ASSUME_NONNULL_BEGIN + (void)logInWithTarget:(nullable id)target selector:(nullable SEL)selector; /** - @abstract *Asynchronously* logs in a user using Twitter. + *Asynchronously* logs in a user using Twitter. @discussion Allows you to handle user login to Twitter, then provide authentication data to log in (or create, in the case where it is a new user) the `PFUser`. @@ -110,7 +110,7 @@ NS_ASSUME_NONNULL_BEGIN authTokenSecret:(NSString *)authTokenSecret; /** - @abstract Logs in a user using Twitter. + Logs in a user using Twitter. @discussion Allows you to handle user login to Twitter, then provide authentication data to log in (or create, in the case where it is a new user) the `PFUser`. @@ -129,7 +129,7 @@ NS_ASSUME_NONNULL_BEGIN block:(nullable PFUserResultBlock)block; /* - @abstract Logs in a user using Twitter. + Logs in a user using Twitter. @discussion Allows you to handle user login to Twitter, then provide authentication data to log in (or create, in the case where it is a new user) the `PFUser`. @@ -154,7 +154,7 @@ NS_ASSUME_NONNULL_BEGIN ///-------------------------------------- /** - @abstract *Asynchronously* links Twitter to an existing PFUser. + *Asynchronously* links Twitter to an existing PFUser. @discussion This method delegates to Twitter to authenticate the user, and then automatically links the account to the `PFUser`. @@ -166,7 +166,7 @@ NS_ASSUME_NONNULL_BEGIN + (void)linkUser:(PFUser *)user PARSE_DEPRECATED("Please use +linkUserInBackground: instead."); /** - @abstract *Asynchronously* links Twitter to an existing `PFUser`. + *Asynchronously* links Twitter to an existing `PFUser`. @discussion This method delegates to Twitter to authenticate the user, and then automatically links the account to the `PFUser`. @@ -178,7 +178,7 @@ NS_ASSUME_NONNULL_BEGIN + (BFTask PF_GENERIC(NSNumber *)*)linkUserInBackground:(PFUser *)user; /** - @abstract *Asynchronously* links Twitter to an existing `PFUser`. + *Asynchronously* links Twitter to an existing `PFUser`. @discussion This method delegates to Twitter to authenticate the user, and then automatically links the account to the `PFUser`. @@ -190,7 +190,7 @@ NS_ASSUME_NONNULL_BEGIN + (void)linkUser:(PFUser *)user block:(nullable PFBooleanResultBlock)block; /* - @abstract *Asynchronously* links Twitter to an existing `PFUser`. + *Asynchronously* links Twitter to an existing `PFUser`. @discussion This method delegates to Twitter to authenticate the user, and then automatically links the account to the `PFUser`. @@ -203,7 +203,7 @@ NS_ASSUME_NONNULL_BEGIN + (void)linkUser:(PFUser *)user target:(nullable id)target selector:(nullable SEL)selector; /** - @abstract *Asynchronously* links Twitter to an existing PFUser asynchronously. + *Asynchronously* links Twitter to an existing PFUser asynchronously. @discussion Allows you to handle user login to Twitter, then provide authentication data to link the account to the `PFUser`. @@ -222,7 +222,7 @@ NS_ASSUME_NONNULL_BEGIN authTokenSecret:(NSString *)authTokenSecret; /** - @abstract *Asynchronously* links Twitter to an existing `PFUser`. + *Asynchronously* links Twitter to an existing `PFUser`. @discussionAllows you to handle user login to Twitter, then provide authentication data to link the account to the `PFUser`. @@ -243,7 +243,7 @@ NS_ASSUME_NONNULL_BEGIN block:(nullable PFBooleanResultBlock)block; /* - @abstract Links Twitter to an existing `PFUser`. + Links Twitter to an existing `PFUser`. @discussion This method allows you to handle user login to Twitter, then provide authentication data to link the account to the `PFUser`. @@ -270,7 +270,7 @@ NS_ASSUME_NONNULL_BEGIN ///-------------------------------------- /** - @abstract *Synchronously* unlinks the `PFUser` from a Twitter account. + *Synchronously* unlinks the `PFUser` from a Twitter account. @param user User to unlink from Twitter. @@ -279,7 +279,7 @@ NS_ASSUME_NONNULL_BEGIN + (BOOL)unlinkUser:(PFUser *)user; /** - @abstract *Synchronously* unlinks the PFUser from a Twitter account. + *Synchronously* unlinks the PFUser from a Twitter account. @param user User to unlink from Twitter. @param error Error object to set on error. @@ -289,7 +289,7 @@ NS_ASSUME_NONNULL_BEGIN + (BOOL)unlinkUser:(PFUser *)user error:(NSError **)error; /** - @abstract Makes an *asynchronous* request to unlink a user from a Twitter account. + Makes an *asynchronous* request to unlink a user from a Twitter account. @param user User to unlink from Twitter. @@ -298,7 +298,7 @@ NS_ASSUME_NONNULL_BEGIN + (BFTask PF_GENERIC(NSNumber *)*)unlinkUserInBackground:(PFUser *)user; /** - @abstract Makes an *asynchronous* request to unlink a user from a Twitter account. + Makes an *asynchronous* request to unlink a user from a Twitter account. @param user User to unlink from Twitter. @param block The block to execute. @@ -307,7 +307,7 @@ NS_ASSUME_NONNULL_BEGIN + (void)unlinkUserInBackground:(PFUser *)user block:(nullable PFBooleanResultBlock)block; /* - @abstract Makes an *asynchronous* request to unlink a user from a Twitter account. + Makes an *asynchronous* request to unlink a user from a Twitter account. @param user User to unlink from Twitter @param target Target object for the selector diff --git a/ParseTwitterUtils/PF_Twitter.h b/ParseTwitterUtils/PF_Twitter.h index 95f9257..c569cae 100644 --- a/ParseTwitterUtils/PF_Twitter.h +++ b/ParseTwitterUtils/PF_Twitter.h @@ -22,37 +22,37 @@ NS_ASSUME_NONNULL_BEGIN @interface PF_Twitter : NSObject /** - @abstract Consumer key of the application that is used to authorize with Twitter. + Consumer key of the application that is used to authorize with Twitter. */ @property (nullable, nonatomic, copy) NSString *consumerKey; /** - @abstract Consumer secret of the application that is used to authorize with Twitter. + Consumer secret of the application that is used to authorize with Twitter. */ @property (nullable, nonatomic, copy) NSString *consumerSecret; /** - @abstract Auth token for the current user. + Auth token for the current user. */ @property (nullable, nonatomic, copy) NSString *authToken; /** - @abstract Auth token secret for the current user. + Auth token secret for the current user. */ @property (nullable, nonatomic, copy) NSString *authTokenSecret; /** - @abstract Twitter user id of the currently signed in user. + Twitter user id of the currently signed in user. */ @property (nullable, nonatomic, copy) NSString *userId; /** - @abstract Twitter screen name of the currently signed in user. + Twitter screen name of the currently signed in user. */ @property (nullable, nonatomic, copy) NSString *screenName; /** - @abstract Displays an auth dialog and populates the authToken, authTokenSecret, userId, and screenName properties + Displays an auth dialog and populates the authToken, authTokenSecret, userId, and screenName properties if the Twitter user grants permission to the application. @returns The task, that encapsulates the work being done. @@ -60,7 +60,7 @@ NS_ASSUME_NONNULL_BEGIN - (BFTask *)authorizeInBackground; /** - @abstract Displays an auth dialog and populates the authToken, authTokenSecret, userId, and screenName properties + Displays an auth dialog and populates the authToken, authTokenSecret, userId, and screenName properties if the Twitter user grants permission to the application. @param success Invoked upon successful authorization. @@ -72,7 +72,7 @@ NS_ASSUME_NONNULL_BEGIN cancel:(nullable void (^)(void))cancel; /** - @abstract Adds a 3-legged OAuth signature to an `NSMutableURLRequest` based + Adds a 3-legged OAuth signature to an `NSMutableURLRequest` based upon the properties set for the Twitter object. @discussion Use this function to sign requests being made to the Twitter API. From 2e973430fee54f70b7882f1360d38ff6e7aa2d12 Mon Sep 17 00:00:00 2001 From: Nikita Lutsenko Date: Wed, 2 Dec 2015 09:30:56 -0800 Subject: [PATCH 4/5] Remove discussion keyword from method documentation. --- ParseTwitterUtils/PFTwitterUtils.h | 24 ++++++++++++------------ ParseTwitterUtils/PF_Twitter.h | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ParseTwitterUtils/PFTwitterUtils.h b/ParseTwitterUtils/PFTwitterUtils.h index 19e2e09..74893cc 100644 --- a/ParseTwitterUtils/PFTwitterUtils.h +++ b/ParseTwitterUtils/PFTwitterUtils.h @@ -61,7 +61,7 @@ NS_ASSUME_NONNULL_BEGIN /** *Asynchronously* logs in a user using Twitter. - @discussion This method delegates to Twitter to authenticate the user, + This method delegates to Twitter to authenticate the user, and then automatically logs in (or creates, in the case where it is a new user) a `PFUser`. @returns The task, that encapsulates the work being done. @@ -71,7 +71,7 @@ NS_ASSUME_NONNULL_BEGIN /** *Asynchronously* logs in a user using Twitter. - @discussion This method delegates to Twitter to authenticate the user, + This method delegates to Twitter to authenticate the user, and then automatically logs in (or creates, in the case where it is a new user) `PFUser`. @param block The block to execute. @@ -82,7 +82,7 @@ NS_ASSUME_NONNULL_BEGIN /* *Asynchronously* Logs in a user using Twitter. - @discussion This method delegates to Twitter to authenticate the user, + This method delegates to Twitter to authenticate the user, and then automatically logs in (or creates, in the case where it is a new user) a `PFUser`. @param target Target object for the selector @@ -94,7 +94,7 @@ NS_ASSUME_NONNULL_BEGIN /** *Asynchronously* logs in a user using Twitter. - @discussion Allows you to handle user login to Twitter, then provide authentication + Allows you to handle user login to Twitter, then provide authentication data to log in (or create, in the case where it is a new user) the `PFUser`. @param twitterId The id of the Twitter user being linked. @@ -112,7 +112,7 @@ NS_ASSUME_NONNULL_BEGIN /** Logs in a user using Twitter. - @discussion Allows you to handle user login to Twitter, then provide authentication data + Allows you to handle user login to Twitter, then provide authentication data to log in (or create, in the case where it is a new user) the `PFUser`. @param twitterId The id of the Twitter user being linked @@ -131,7 +131,7 @@ NS_ASSUME_NONNULL_BEGIN /* Logs in a user using Twitter. - @discussion Allows you to handle user login to Twitter, then provide authentication data + Allows you to handle user login to Twitter, then provide authentication data to log in (or create, in the case where it is a new user) the `PFUser`. @param twitterId The id of the Twitter user being linked. @@ -156,7 +156,7 @@ NS_ASSUME_NONNULL_BEGIN /** *Asynchronously* links Twitter to an existing PFUser. - @discussion This method delegates to Twitter to authenticate the user, + This method delegates to Twitter to authenticate the user, and then automatically links the account to the `PFUser`. @param user User to link to Twitter. @@ -168,7 +168,7 @@ NS_ASSUME_NONNULL_BEGIN /** *Asynchronously* links Twitter to an existing `PFUser`. - @discussion This method delegates to Twitter to authenticate the user, + This method delegates to Twitter to authenticate the user, and then automatically links the account to the `PFUser`. @param user User to link to Twitter. @@ -180,7 +180,7 @@ NS_ASSUME_NONNULL_BEGIN /** *Asynchronously* links Twitter to an existing `PFUser`. - @discussion This method delegates to Twitter to authenticate the user, + This method delegates to Twitter to authenticate the user, and then automatically links the account to the `PFUser`. @param user User to link to Twitter. @@ -192,7 +192,7 @@ NS_ASSUME_NONNULL_BEGIN /* *Asynchronously* links Twitter to an existing `PFUser`. - @discussion This method delegates to Twitter to authenticate the user, + This method delegates to Twitter to authenticate the user, and then automatically links the account to the `PFUser`. @param user User to link to Twitter. @@ -205,7 +205,7 @@ NS_ASSUME_NONNULL_BEGIN /** *Asynchronously* links Twitter to an existing PFUser asynchronously. - @discussion Allows you to handle user login to Twitter, + Allows you to handle user login to Twitter, then provide authentication data to link the account to the `PFUser`. @param user User to link to Twitter. @@ -245,7 +245,7 @@ NS_ASSUME_NONNULL_BEGIN /* Links Twitter to an existing `PFUser`. - @discussion This method allows you to handle user login to Twitter, + This method allows you to handle user login to Twitter, then provide authentication data to link the account to the `PFUser`. @param user User to link to Twitter. diff --git a/ParseTwitterUtils/PF_Twitter.h b/ParseTwitterUtils/PF_Twitter.h index c569cae..bdb8957 100644 --- a/ParseTwitterUtils/PF_Twitter.h +++ b/ParseTwitterUtils/PF_Twitter.h @@ -75,7 +75,7 @@ NS_ASSUME_NONNULL_BEGIN Adds a 3-legged OAuth signature to an `NSMutableURLRequest` based upon the properties set for the Twitter object. - @discussion Use this function to sign requests being made to the Twitter API. + Use this function to sign requests being made to the Twitter API. @param request Request to sign. */ From 078a1ee8aa53328fd342b194058e8c8b73dfa1eb Mon Sep 17 00:00:00 2001 From: Nikita Lutsenko Date: Wed, 2 Dec 2015 09:31:14 -0800 Subject: [PATCH 5/5] Replace returns with return keyword for method documentation. --- ParseTwitterUtils/PFTwitterUtils.h | 18 +++++++++--------- ParseTwitterUtils/PF_Twitter.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ParseTwitterUtils/PFTwitterUtils.h b/ParseTwitterUtils/PFTwitterUtils.h index 74893cc..adf42f1 100644 --- a/ParseTwitterUtils/PFTwitterUtils.h +++ b/ParseTwitterUtils/PFTwitterUtils.h @@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN /** Gets the instance of the `PF_Twitter` object that Parse uses. - @returns An instance of `PF_Twitter` object. + @return An instance of `PF_Twitter` object. */ + (nullable PF_Twitter *)twitter; @@ -50,7 +50,7 @@ NS_ASSUME_NONNULL_BEGIN @param user User to check for a Twitter link. The user must be logged in on this device. - @returns `YES` if the user has their account linked to Twitter, otherwise `NO`. + @return `YES` if the user has their account linked to Twitter, otherwise `NO`. */ + (BOOL)isLinkedWithUser:(nullable PFUser *)user; @@ -64,7 +64,7 @@ NS_ASSUME_NONNULL_BEGIN This method delegates to Twitter to authenticate the user, and then automatically logs in (or creates, in the case where it is a new user) a `PFUser`. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ + (BFTask PF_GENERIC(PFUser *)*)logInInBackground; @@ -102,7 +102,7 @@ NS_ASSUME_NONNULL_BEGIN @param authToken The auth token for the user's session. @param authTokenSecret The auth token secret for the user's session. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ + (BFTask PF_GENERIC(PFUser *)*)logInWithTwitterIdInBackground:(NSString *)twitterId screenName:(NSString *)screenName @@ -173,7 +173,7 @@ NS_ASSUME_NONNULL_BEGIN @param user User to link to Twitter. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ + (BFTask PF_GENERIC(NSNumber *)*)linkUserInBackground:(PFUser *)user; @@ -213,7 +213,7 @@ NS_ASSUME_NONNULL_BEGIN @param screenName The screen name of the Twitter user being linked. @param authToken The auth token for the user's session. @param authTokenSecret The auth token secret for the user's session. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ + (BFTask PF_GENERIC(NSNumber *)*)linkUserInBackground:(PFUser *)user twitterId:(NSString *)twitterId @@ -274,7 +274,7 @@ NS_ASSUME_NONNULL_BEGIN @param user User to unlink from Twitter. - @returns Returns true if the unlink was successful. + @return Returns true if the unlink was successful. */ + (BOOL)unlinkUser:(PFUser *)user; @@ -284,7 +284,7 @@ NS_ASSUME_NONNULL_BEGIN @param user User to unlink from Twitter. @param error Error object to set on error. - @returns Returns `YES` if the unlink was successful, otherwise `NO`. + @return Returns `YES` if the unlink was successful, otherwise `NO`. */ + (BOOL)unlinkUser:(PFUser *)user error:(NSError **)error; @@ -293,7 +293,7 @@ NS_ASSUME_NONNULL_BEGIN @param user User to unlink from Twitter. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ + (BFTask PF_GENERIC(NSNumber *)*)unlinkUserInBackground:(PFUser *)user; diff --git a/ParseTwitterUtils/PF_Twitter.h b/ParseTwitterUtils/PF_Twitter.h index bdb8957..bc0785a 100644 --- a/ParseTwitterUtils/PF_Twitter.h +++ b/ParseTwitterUtils/PF_Twitter.h @@ -55,7 +55,7 @@ NS_ASSUME_NONNULL_BEGIN Displays an auth dialog and populates the authToken, authTokenSecret, userId, and screenName properties if the Twitter user grants permission to the application. - @returns The task, that encapsulates the work being done. + @return The task, that encapsulates the work being done. */ - (BFTask *)authorizeInBackground;